gorichan Posted February 12, 2007 Report Posted February 12, 2007 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 Quote
Guest anonymous Posted February 12, 2007 Report Posted February 12, 2007 Hello gorichan, # represents a Hex value, & represents a Decimal value. I.e. #10 = &16. Hope this helps Regards anonymous Quote
gorichan Posted February 12, 2007 Author Report Posted February 12, 2007 Hello anonymous Thanks. Of course that helps!! Thanks again. Quote
TERdON Posted February 12, 2007 Report Posted February 12, 2007 # 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. Quote
gorichan Posted February 12, 2007 Author Report Posted February 12, 2007 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? Quote
Sleepy Wombat Posted February 12, 2007 Report Posted February 12, 2007 use BCD instruction of course Quote
Marco8037 Posted March 27, 2008 Report Posted March 27, 2008 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 Quote
Recommended Posts
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.