Stefan009

Get full date & time into the plc?

5 posts in this topic

Hi.
I want to get the full date and time into the plc, where i want to calculate when current step and full sequence is expected to finish and then later present it back on the screen.

I tried to map the _HMI_DateTime to the controller, but it does not get added to the controller.

Share this post


Link to post
Share on other sites

The PLC already has a clock variable.  Can it be used instead?

You should be able to create a variable in the PLC, map it in the HMI, then use a timed global event to copy the value from the HMI clock into that variable to send it back to the PLC.

Share this post


Link to post
Share on other sites
56 minutes ago, Crossbow said:

then use a timed global event to

Thanks, never looked into global events, and have been looking for a timer somewhere in the controls / toolbox.

The PLC iirc ONLY have the time, but i need even date because there are some processes that can take a full day to complete.

Share this post


Link to post
Share on other sites

I have used the "GetTime" function previously. It outputs a variable with a DATE_AND_TIME data type that includes both date and time. It is based on the clock in the PLC, which does track date and time.

I then used DT_TO_DATE & DT_TO_TOD to split up the date and time, but that was because I needed them to be separate for some CSV fields.

This was using an NX102 CPU. 

Edit: Screenshot didn't upload, apparently I can't upload JPEG files :-0

Edited by BE

Share this post


Link to post
Share on other sites
14 hours ago, BE said:

Edit: Screenshot didn't upload, apparently I can't upload JPEG files :-0

It seems that attachments are not functioning again, we have made the site owners aware.

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