Jump to content

Recommended Posts

Posted

I have the below formula in CPT instruction (not able to attach any pics)... 

IO_Rmc_Data = (IO_Rmc_Data+1) MOD 10

What does MOD 10, MOD 1000, MOD 10000 do ? On help it says it stores the remainder of division, but here its doing something else. 

Posted (edited)

I would assume IO_Rmc_Data is an index for a 10 element array of Data.

The forrmula is creating a repeating 0-9 output. So if when IO_Rmc_Data = 9 , the next time the CPT is executed (IO_Rmc_Data+1) MOD 10, would equate to 10 MOD 10 which = 0

Edited by chelton
rephrase
Posted
1 hour ago, chelton said:

I would assume IO_Rmc_Data is an index for a 10 element array of Data.

The forrmula is creating a repeating 0-9 output. So if when IO_Rmc_Data = 9 , the next time the CPT is executed (IO_Rmc_Data+1) MOD 10, would equate to 10 MOD 10 which = 0

yes, you are right. Actually IO_Rmc1:O.Data[0] is an array of Real[124], and we have the formula IO_Rmc1:O.Data[0]=(IO_Rmc1:O.Data[0]+1)MOD1000.

So I believe we increment IO_Rmc1:O.Data[0] from 0 to 999 and then repeat ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...