Sign in to follow this  
Followers 0
will king

PC clock update though CLX command

9 posts in this topic

Hi all, Is there any command or tools to change the PC clock through Controllogix Rslogix5000 CLX program. Appreciate to get some help. Thanks

Share this post


Link to post
Share on other sites
Am I understanding your request correctly. You have a Contrologix PLC which you want to use to change the time of a given Personal Computer (PC). Is that correct? The inverse is actually more common and done with regularity. That's why I ask.

Share this post


Link to post
Share on other sites
In addition to Bob's question, I'd ask if the PC in question is running an HMI package.

Share this post


Link to post
Share on other sites
thanks for reply, Yup i will get a command from DCS which are link to my CLX5000 through Modbus. When i get command from DCS, would like to use CLX to updatea given personal computer clock time where HMI RSview32 in it. i have try Logix5000 update clock tools but it seems to update my CLX clock only. Appreciate to get some help on this. Thanks

Share this post


Link to post
Share on other sites
What you want can be done relatively simply. You'll need a tag in the CLGX called update clock. You'll also need tags in the CLGX which contain the date data. You'll need a script in the RSView HMI which watches the Update CLock tag. When Update Clock is true then use the windows Date and Time commands to change the values of the PC to match those read from the PLC. Others will offer more detail and different approaches, but the concept is basically the same.

Share this post


Link to post
Share on other sites
When the RSView script sees the update clock tag go true it can call the vbaexec command to run a vba program. The VBA program accesses the other RSView tags containing the date time values to be set using the RSView object model and then updates the PC clock. I'm not sure what VBA commands to use to set the PC clock but I'm sure you can find it in one of the many VBA forums that are out there. It may use WIN API calls or maybe possibly the shell date and shell time instructions might work. eta be sure the vba or the rsview script resets the clock update tag after it completes the update. Don't expect perfect synchronization, by the time RSView completes the update there will be a small discrepancy in the times. Edited by Alaric

Share this post


Link to post
Share on other sites
thanks bob i am not so good on the scripting at RSView32. Do you have some sample to follow and try out. Appreciate on your help. Thanks

Share this post


Link to post
Share on other sites
I don't have a script for this in fact at this employer I don't even have access to RSView 32 , but I think you'll find several scripting examples on your Source CD and in the online Help files. Check these out and let us know what doesn't work or fall into place for you.

Share this post


Link to post
Share on other sites
Hi thanks for advise, anyone can help on this. Is there a tools rather than using script to change the PC clock

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0