Industry Online Support
Technical Forum
7/27/2014 8:37 AM | |
Posts: 8946 Rating: (999) |
"move" will not change format. It copy the bit-pattern. For format convertion, you need convertion commands. |
7/27/2014 8:57 AM | |
Posts: 101 Rating: (0) |
helloIBN-Service, thank you for quick reply
if you look in the pic. that i alredy attached you find that 1- bit pattern is not copied as it is. 2-C1 is in BCD format and its value is 13 in decimal. and 0000_0000_0001_0011 in binary if move copy bit pattern and puts it in MW3 (int format) so the value of MW3 will be 19 in decimal. and this was not happend as you see in pic it converted to 0000_0000_0000_1101. hope you understand me thanks again ........................................ mohamed elokby
|
7/27/2014 11:43 AM | |
Posts: 5225 Rating: (1195) |
if you look in the pic. that i alredy attached you find that 1- bit pattern is not copied as it is. 2-C1 is in BCD format and its value is 13 in decimal. and 0000_0000_0001_0011 in binary if move copy bit pattern and puts it in MW3 (int format) so the value of MW3 will be 19 in decimal. and this was not happend as you see in pic it converted to 0000_0000_0000_1101. [smile] Yes I agree it can be confusing. The problem is that you can have a counter give you a representation in BCD or in "INT" format. In STL it is a bit more clear.. "LC C1" loads the value as a BCD number, while "L C1" loads the number in a INT format. The status display is set to show you the BCD number while the MOVE instruction is using the INT format. Do yourself a favour.. Put the MOVE portion in its own network. Then convert the network to STL. You should see the following code in STL.. [code]L C1 T MW3[/code] On a personal opinion note.. In your network 1 you do not need the MOVE instruction. Put the MW13 to the output CV or CV_BCD.. depending if what format you hope for. You also do not have to move the counter value to anywhere. You could use C1 as is. Just be aware to what the instruction needs. In the case of PV input in S_CU it will automatically read C1 as a BCD number.. which is okay. C1 can also be read as a bit.. again be careful - read up on how the counters work. C1 bit is ON when the C1 word value is not zero. (I appologise if you already knew this.) Best wishes. w |
7/27/2014 3:00 PM | |
Posts: 8946 Rating: (999) |
[/Quote] It is. You just look to two different Memory locations, as already explained before. |
Follow us on