
adccommunitymod (AutomationDirect) asked a question.
Created Date: March 03,2011
Created By: clintonp
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
I'm developing a DL06-based system that will communicate with the client's SCADA system via MODBUS TCP (H0-ECOM100). The client wants me to synchronize the DL06 time with the SCADA system clock each day. They have not yet told me where I'm going to find the time data, nor what its format will be. So here's a rookie question: Is there any sort of standard for time-of-day data in modern SCADA systems? Are they likely to give me the actual local time? The number of 100 millisecond ticks since Charles Babbage was born? Is there any reason to have any expectation at all about the format? Thanks, Paul in SE Wisconsin
Created Date: March 03,2011
Created by: Do-more PE
No telling. With SCADA systems that I have worked with, I have seen it as actual time, Greenwich Mean Time, and Julian time/date.
Just hope that it isn't in Julian format. :)
Created Date: April 13,2011
Created by: clintonp
More info on time synchronization
I now have some more information on my time synchronization challenge, and it may be worse than I imagined.
I was originally told that I would have to poll the timeserver every 24 hours, get the time, and update the DL06 clock. I'm now told that the SCADA system will have an NTS Time Server that broadcasts the time to the nodes on the network. That's great if you 're a PC on the network. I have no idea how I can get the PLC (DL06/H0-ECOM100) to accept and make sense of the transmitted timestamp. Anybody have experience with this? Ideas?
Thanks for your help,
Paul in SE Wisconsin
Created Date: April 18,2011
Created by: JimHoward
Paul,
Why don't you give BRG Precision Products a call? They have a website, but it is much easier to talk to one of their engineers about what products they can build. They make all kinds of cool time-based products, and can probably solve your problem. Maybe something as simple as a Time-reader/clock that closes a contact at 2:00am every day, and the PLC synchronizes to that?
BRG Precision Products
600 N. River St
Derby, KS 67037
800-295-0220
www.brgprecision.com
Created Date: April 19,2011
Created by: clintonp
Thanks for the lead, Jim -- but I don't have the time to fool with a custom hardware solution.
I can sort out the time if I can get the data from the server. I'll take the integer time value from the timeserver as seconds since 1/1/1900, and subtract the time value of 1/1/2011. Then I'll divide that by 86,400 (the number of seconds in a day). I'll throw away the integer part of the result -- that will be the day of year -- and multiply the the remainder by 24 to get the time of day. I'll use the result to set the PLC clock. I'm pretty sure that will all work.
The challenging part for me will be figuring out how to poll the timeserver and get the starting value -- the integer part of the NTP timestamp. With any luck at all, it will involve poking the timeserver with a an ECWX or NETWX, reading the response with an ECRX or a NETRX, saving the integer time stamp, and doing the math. But I have to do all this without the timeserver in hand. THAT should be interesting! I'm hoping to be able to set up a PC to emulate the timeserver, such that I can poke it and get the same sort of response the the timerserver would give. I'm in over my head -- but I suspect that I'll pull it off.
If anybody has any comments about this approach, I'd love to hear them! It's a brute force approach, but I think it will work.
Paul is SE WI
Created Date: April 20,2011
Created by: 2tim17
Modbus TCP
We had a similar app. We used a simple php script to grab the server time stamp and write to the ecom ip at a designated time every few days. Do you have I.T. available to write the script?
Created Date: April 20,2011
Created by: clintonp
Thanks, Tim.
We 're certainly considering the possibility of a small PC-based application on a system on the network to fetch the time and pass it on to the PLC. That seems like a potentially viable approach.
A couple of questions about what you did:
1) Why did you choose PHP? ...as opposed, say, to VB, or anything else? Can we see your code?
2) How do you send the time data to the ECOM? ModbusRTU? It's seems as though I could just have the PC-based app write the values directly to the V-memory locations that hold the time using MODBUS. *IF* the client will accept this approach, and *IF* the client has a PC on the SCADA network on which we can install this applet, it seems like a trivial solution. I can't imagine that there's no PC on the network, but who knows?
Thanks again for your response!
Paul
Created Date: April 20,2011
Created by: 2tim17
SCADA Comm
Paul;
I.T. used PHP because they are very familiar with it and the open source code is out on the web. I'm sure VB would work also but most of our I.T. guys prefer open source. Only the real geeks use VB, I'm raising my hand too. I will get with them for the code. We are using it to talk to 205 series, the addressing maybe the same as the 06, I will check.
The communication is Modbus TCP and yes it writes directly to the V elements. WAY Cool! Modbus TCP does have to be enabled in the ECOM. This is really a slick way to do it as even though we are using KEPware and OPC in other apps., neither are required for this.
We are also using a short PHP script for reading hour meters straight from the PLC.
Warning, once a client learns you can tx/rx this data you could become a application writer.
I'll get back to you
Tim
Created Date: April 20,2011
Created by: clintonp
Thanks for all your help, Tim.
If getting the code is easy, that would be great! If it's a hassle, don't bother. We have some experience manipulating the DL06 via MODBUS/ECOM/VB -- we have a nifty VB app that monitors our PLC application, and allows some things (schedule) to be manipulated.
The best news that I 've had in a while is that the client DOES have a desktop PC on the SCADA network, and has agreed to having such an applet on the desktop to set the PLC time. VERY MAJOR obstacle overcome!
With much gratitude for all the great help that I have gotten here,
Paul
Created Date: May 03,2011
Created by: clintonp
Thanks, Tim.
We have our code all working. We don't have the actual time server, so we had to fake it by making one of our PCs a time server. We have faith that the code will run against the real time server on the client's SCADA network. We'll see...
Grateful regards,
Paul
Created Date: March 03,2011
Created by: clintonp
I'm developing a DL06-based system that will communicate with the client's SCADA system via MODBUS TCP (H0-ECOM100).
The client wants me to synchronize the DL06 time with the SCADA system clock each day. They have not yet told me where I'm going to find the time data, nor what its format will be. So here's a rookie question: Is there any sort of standard for time-of-day data in modern SCADA systems? Are they likely to give me the actual local time? The number of 100 millisecond ticks since Charles Babbage was born? Is there any reason to have any expectation at all about the format?
Thanks,
Paul in SE Wisconsin