Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus frames

I have a Sepam 2000 instrument from Schneider over RS-485 and Modbus protocol, I'm using Lookout 4.5 to monitoring and controling the instrument. I need to fix time and date on the instrument. The Schneider documentation shows the register 0002 like read/write and to fix the date and time needs 4 words of 16 bits. Next 3 registers 0003, 0004, 0005 are read only. The modbus frame needed to fix date and time in broadcast message is per example 00 10 0002 0004 08 005D 0714 0B05 1234 (2C9E)crc, the date encoded in the frame is 20 july 1993 and the time is 11 hours:5 minutes:4660 millisecond.

my question is How can I send the modbus frame mentioned above?
How can I send 3 or more words in one address?


thanks in advance
0 Kudos
Message 1 of 2
(3,107 Views)
It seems your question is made up of three parts:

1) How do I parse (break into its constituent components) Lookout's system time?
2) How do I convert this time into a hexadecimal format?
3) How do I write these values to my instrument from Lookout?

I am not familiar with Modbus but I am proficient in data conversions in Lookout. So, maybe I can help?!?!

Question #1 is already answered with example files. Do a search in this message board for "Time Clock". There you will find your answer to parsing Lookout's time into decimal format and outputting the values to pots, or any datamember of a Lookout object for that matter.

Question #2 is answered with example files also. Do a search in this message board for "hexadecimal conversion". There you will find the answer to converting decimal values to hexadecimal.

As for question #3: You are , obviously, using Lookout's Modbus driver. This object has datamembers you can connect the output of your yet to be built "time parser/hex conversion/update" Lookout code. Your question above says the documentation refers to register 0002 as the date and time register. This register, in all likely hood, is equivalent to the datamember 0000002 in Lookout's Modbus driver object. This is what you would connect the output of your "time parser/hex conversion/update" code to. Your example gives HEXadecimal(005D 0714 0B05 1234) = DECimal(0093 July20 11Hours05Minute 4.660seconds)- You said 1993 but I assume you mean 2093. As the final result of my code I would have 4 expressions evaluated as text ( your 4 output words above). I would concatenate the 4 text expressions with each other using the "&" operator . I would then concatenate this text expression with "0x" using the "&" operator. The 0x tells Lookout this is a hexadecimal value. Now connect this expression to the datamember 0000002. Since Lookout supports data polymorphism this may very well work.

Remember: This is only an idea. I am not experienced with Modbus so proceed with caution. I hope this does get your creative juices flowing!

Regards,
Tommy Scharmann
Message 2 of 2
(3,107 Views)