Jump to content

Recommended Posts

Posted
Hi all, Can any body tell me that how to write Real_Flot) Number in adata registers in PLC program. to write integer 100 in data register D1 we write thr instruction [MOV K100 D1] For writing Real value what should be the statement. Regards Naresh P.
Posted
These instructions is different for each PLC type: For an FX2N series PLC : MOV K100 D0 FLT D0 D10 ................. INT D10 D20 First move the value K100 into register D0 Convert D0 to floating point format into D10 Do something with the value Next convert D10 in floating point back to decimal into D20 The function FLT is depending on special bit M8023, if M8023 is off the conversion is from decimal to floating point, if M8023 is on the conversion is from floating point to decimal. floating point numbers are 32 bit, so the conversion backwards is in 32 bits format. For a Q system you can write direct a floating point value: EMOV E100 D0 Conversion functions are the same as for the FX series.

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...