smcmanus Member S Join Date Jan 2006 Location Vancouver Posts 109 Jun 15, 2006 #1 Hi am having trouble converting a simple string value to an integer. For example I want to convert string value "90" to an integer. The value should be 14640. I cannot get it to work.
Hi am having trouble converting a simple string value to an integer. For example I want to convert string value "90" to an integer. The value should be 14640. I cannot get it to work.
Contr_Conn Member Join Date Sep 2003 Location Ohio Posts 2,581 Jun 15, 2006 #2 COP STRING.DATA[0] TAG_INT 1 TAG_INT - integer tag
smcmanus Member OP S Join Date Jan 2006 Location Vancouver Posts 109 Jun 15, 2006 #3 tried this. it does not work.
Contr_Conn Member Join Date Sep 2003 Location Ohio Posts 2,581 Jun 15, 2006 #4 You have to add after copy byte swap: SWPB TAG_INT REVERSE TAG_INT2
Contr_Conn Member Join Date Sep 2003 Location Ohio Posts 2,581 Jun 15, 2006 #6 smcmanus Just copy my example, as you see it works bernie_carlton STOD will not work in this case as INT will have value of 90 instead of 14640
smcmanus Just copy my example, as you see it works bernie_carlton STOD will not work in this case as INT will have value of 90 instead of 14640
smcmanus Member OP S Join Date Jan 2006 Location Vancouver Posts 109 Jun 15, 2006 #7 Thanks you so much. It works fine. I have asked like 6 PLC programmers an nobody new.
Contr_Conn Member Join Date Sep 2003 Location Ohio Posts 2,581 Jun 15, 2006 #8 smcmanus said: I have asked like 6 PLC programmers an nobody new. Click to expand... Get Rockwell support contract and call them as needed.
smcmanus said: I have asked like 6 PLC programmers an nobody new. Click to expand... Get Rockwell support contract and call them as needed.