TT_ZX Posted July 26, 2011 Report Share Posted July 26, 2011 I have a modbus device that I would like to update the time on periodically. The date format is not quite the same as the PLC and I can't work out a simple way of sending the correct values. The data structure is detailed below (hopefully it will display correctly). All values are 16bit unsigned integers. Address Words Description 49 1 WEEKDAY 50 3 YEAR, MONTH, DAY 53 3 HOUR, MINUTE, SECOND My intention was to get the correct values into a vector of XI's and then write them to the modbus device in one operation. It looks simple enough but I can't get the correct YEAR, MONTH, DAY values into consecutive XI's in the correct order. There maybe be a better way to do this but I can't figure it out with my limited experience. Hopefully someone here can help me out with this one. Thanks in advance, Justin Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted July 26, 2011 MVP 2023 Report Share Posted July 26, 2011 Try this- Joe T. Link to comment Share on other sites More sharing options...
TT_ZX Posted July 27, 2011 Author Report Share Posted July 27, 2011 Thanks Joe. Net 2 was the key, SL4 in particular. I've already founds another use for SL4 before posting back. Cheers, Justin 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