Jump to content

Recommended Posts

Posted
Hey guys. I just want to know what is the meaning of these following symbols # = ? & = ? Is it Binary, Hex, BCD, Decimal or what? Those symbols are assigned in CX-Programmer for CMP(20) instruction purpose.Im using PLC CQM1H type. And Im comparing analog input with certain constant value. Cheers
Guest anonymous
Posted
Hello gorichan, # represents a Hex value, & represents a Decimal value. I.e. #10 = &16. Hope this helps Regards anonymous
Posted
# is also used for BCD. If your #-constant is interpreted as hex or BCD is context-dependant - basically, some instructions interpret their parameters as hex, some as BCD, and some work with both as long as you stick to one type(example: CMP). There's no difference how hex vs BCD is stored in the PLC memory, so the only way to know the content of the word is from the symbols and/or the code.
Posted
ohh. I see. But my constant, I set it with & because the analog input that CMP(20) reads (as default) as &. Its range from &0 up to &2047. How I want to make CMP(20) reads the analog input as # instead?
Posted
Do something like this in ladder BCD (ANALOG INPUT ADRESS) D100 The analog input is now stored on D100 as a BCD value. If you ant to convert that input fot a value in BCD, but with another scale do as the follow: MOV &0 D200 MOV #0 D201 MOV &2047 D202 MOV #500 D203 SCL (Analog input adress) D200 D300 The analog input is now stored as a BCD value coming from 0 to 500

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