Jump to content
OMRON Forums

M-Var set to Real


Recommended Posts

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I think you will need a small trick here. First, you will write your value to a holding register in the user shared memory buffer as a 32-bit floating-point value. For example,

 

Sys.Fdata[100] = MyValue

 

Then you can access the 4 bytes in this representation individually with Cdata elements:

 

Sys.Cdata[400]

Sys.Cdata[401]

Sys.Cdata[402]

Sys.Cdata[403]

 

Note that since there are 4 Cdata elements per Fdata element, the indices are 4 times greater.

 

So these can simply be copied a byte at a time to the 4 byte registers of your ACC-14E:

 

Acc14E.DataReg[0] = Sys.Cdata[400]

etc.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...