Vitaly K. Posted February 8, 2011 Report Share Posted February 8, 2011 PLC V130 receives double float (64 bit) as 8 bytes with the following format: http://en.wikipedia.org/wiki/IEEE_754-1985#Double-precision_64_bit Can I easily get double float like here: http://www.unitronics.com/forum/topic.asp?TOPIC_ID=2102&SearchTerms=swap+bytes ? And one more question about FB Swap bytes. It puts swapped bytes into the same MI's. But these MI's are cyclically got from COM-port. So MI's values blink: swapped-unswapped. How can I avoid of the blinking? Link to comment Share on other sites More sharing options...
Emil Posted February 8, 2011 Report Share Posted February 8, 2011 About the second question - you can store/copy received MI to another MI and there to perfomr Swap. In this case you will have two registers - each one with its value. About 64 bit Floating point - currently Unitronics OPLC support 32 bit FP. You can receive the bitmap in two sequental DW, but I don't know how you can decode them to receive the floating point number. Link to comment Share on other sites More sharing options...
Vitaly K. Posted February 11, 2011 Author Report Share Posted February 11, 2011 About the second question - you can store/copy received MI to another MI and there to perfomr Swap. In this case you will have two registers - each one with its value. If I copy MI to another MI during every program scan, the swapped value of another MI will be overwritten by the unswapped value in the next program scan. There must be condition for copiing. Link to comment Share on other sites More sharing options...
Emil Posted February 12, 2011 Report Share Posted February 12, 2011 You're right - there must be condition. Which kind of communication you use? If FB Protocol - Condition can be Message received MB. If FB Modbus (Master)- negative transition of Function in progress is error code is 0. Link to comment Share on other sites More sharing options...
Vitaly K. Posted February 14, 2011 Author Report Share Posted February 14, 2011 I use FB protocol. Thank you for the answer. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now