05-21-2013 07:37 PM
I found out (the hard way) that when I changed the time on a PXI chassis, the deployed Modbus libraries Halted.
The were still active and contained data, but the timestamps were all from when I changed the time.
I had to stop and re-start both the Serial and TCP/IP Modbus Libraries using distribution manager before they recovered.
Any thoughts/Comments.
05-22-2013 07:18 PM
Hello Timmar,
Do you have some specific steps to reproduce this behavior? Which PXI chassis do you have or you got this behavior with different devices?
Regards
05-22-2013 10:21 PM
I haven't Gone out of my way to test it.
Step 1: @12:44pm, Change AM to PM using the web interface on a PXI-8108.
Step 2: Wonder why Clients interface ceases to Work
Step 3: Distribution Manager: Observe All Modbus Variables last Updated @ 12:44. It is Now 15:30
Step 4: Stop and restart Modbus processes using Distribution manager.
Modbus Libraries begin updating, Last update 15:30:12 , 13, 14, 15....... (normal).
*Controller was not reset during this process.
05-22-2013 11:24 PM - edited 05-22-2013 11:26 PM
I have used modbus but don't know much about the protocol itself. Does it use some sort of timestamping in the protocol and changing the clock while running throws it out of whack? For instance, if it thinks it went "back in time" or something of the sorts? This is a total stretch, and with my limited knowledge most likely incorrect. It seems this should be supported, as I'm assuming many people sync their PXI time to another source nightly, and modbus should transition seemlessly through this.
05-22-2013 11:41 PM
We pay NI a big swag of money each year so I don't have to know about the modbus Protocol.
I write to an NPSV and the driver does the rest for me.
My expectation is that a clock change should be seamless, Going back in time should flag an error handling case that corrects for it.
Worst case I get a data Glitch (Which is why I did it while the system wasn't in use)
05-23-2013 12:01 AM - edited 05-23-2013 12:02 AM
Ah, I haven't used modbus with NPSV. I have used these VIs in the past. I'm curious if you run into the same problem using those. It doesn't solve your problem (I agree it should be handled, and I'm by no means suggesting a solution is refactoring your code to use these VIs) but it may be something to test from a comparison standpoint.
05-23-2013 12:04 AM
This posting was mainly meant as a cursery warning to other modbus users.
My Workaround is to reboot the contoller after changing the time.
Also as a gentle prod to the NI boffins that it is a potential bug.
As to the VI's
The functionality is Now Fully integrated into the NPSV liabries.
05-23-2013 12:16 AM - edited 05-23-2013 12:16 AM
@Timmar wrote:
This posting was mainly meant as a cursery warning to other modbus users.
My Workaround is to reboot the contoller after changing the time.
Also as a gentle prod to the NI boffins that it is a potential bug.
As to the VI's
The functionality is Now Fully integrated into the NPSV liabries.
Alrighty, I thought it was a complete show stopper. And that is good to know about NPSVs...although, in general, I try to avoid them.