Sign in to follow this  
Followers 0
MikeSparks

Program Using the PLC Real-Time Clock

3 posts in this topic

Hello All - First time posting here, please allow some leniency if I'm not posting correctly... It's been many years since I've programmed so I'm a bit rusty. I have a SLC500 and use RSLogix500 to program the ladder logic. I have a FactoryTalk View ME application were I'm using the ActiveX MEDataStorePlus control to capture process data from my SLC500. My goal is to send process data from the SLC500 to a .csv file at certain times (before the end of a shift), using FactoryTalk. The problem is the MEDataStorePlus control uses a trigger to activate the data collection. What I believe I need to do is write some code in the ladder logic to look at the real-time clock in the PLC. Once the PLC real-time clock equals 6:45 am, 2:45 pm and 10:45 pm respectively, I will set a bit in the PLC that is picked up through my FactoryTalk View ME application and thus sets the trigger for the MEDataStorePlus, collecting my process data. Quite frankly I'm a bit rusty at programming and the scenario I explained is a bit over my head. Does anyone have any suggestions to get me going or perhaps were I could view sample code using the SLC500 real-time clock in a ladder program? It appears the system or status bits I would be looking at our S40 (HH) and S41 (MM). Best Regards, Mike

Share this post


Link to post
Share on other sites
Greetings Mike, and welcome to the forum. Paste the following into an empty rung in an empty program. Insert a new rung, double click the rung number to the lef of the rung, and paste this text into the mnemonic field that opens. EQU S:40 6 EQU S:41 45 OSR B3:0/0 OTE B3:0/1 This rung shows how to set a trigger at 6:45 am. In this example the trigger will last for just one scan because of the one-shot. Hopefully its enough to get you started.

Share this post


Link to post
Share on other sites
Yes, that will get me started. Thanks for your help Alaric. Have a good one, Mike

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