Peter Nachtwey
Member
I have a Micrologix 1500. I need to copy a bits from a floating point file into a bit file. I have tried using the COP and the MOV command, but I keep on getting overlow errors in the case of the MOV command and data size errors in the case of the COP command. The COP documentation on the on-line help says I should be able to copy between two different data types but it will not let me copy floats to bits. The COP command does not work as documented. I tried using
COP #F8:41 #b3:2 64
The documentation said that the lenght is specified in destination usings and I want to copy 64 bits worth of data.
You may ask why do I need to do this? A msg block reads 8 floats from a smart device. 7 of the floats are really floats, but one of the floats is really just a bunch of status bits that must be copied to a Bit file to make sense of them. Otherwise two msg blocks would be required. One to get the floating point values and another to get the status bits. This requires more msg block and time and I and my customers don't want to use two msg blocks.
Surely someone has done this before.
COP #F8:41 #b3:2 64
The documentation said that the lenght is specified in destination usings and I want to copy 64 bits worth of data.
You may ask why do I need to do this? A msg block reads 8 floats from a smart device. 7 of the floats are really floats, but one of the floats is really just a bunch of status bits that must be copied to a Bit file to make sense of them. Otherwise two msg blocks would be required. One to get the floating point values and another to get the status bits. This requires more msg block and time and I and my customers don't want to use two msg blocks.
Surely someone has done this before.