M_ah

Date and time data type in GX Works2

3 posts in this topic

Hello,

Completely new to Mitsubishi PLCs and I need to use a date and time stamp for data collection purposes. We have a Siemens PLC as well and this has the data type "Date_And_Time" which is what I need to replicate. I have been attempting to write my own data type but am struggling with how to go about this as it is not straightforward and I cannot find anything about how the Siemens Date_And_Time is made up so I have nothing to go off.

Does anyone have an example of a data type they have made that is the same? Or is there a data type which does this already in GX Works 2 that I just can't seem to find? 

Please help!

Share this post


Link to post
Share on other sites

I think the first question is how you will data collect.

The QnUDV have a built in datalogger in which you can select to add the date time stamp.
If you need to log to a DB you can use the MES module QJ71MES96 which will do the same. If you have a GOT HMI (GT25) connected this can do the same job.

If you want to get the Date time in the PLC just use a DATERD instruction which will read the cllock element in a 7 word devices for 

Year 
Month
Day
Hour
Minute
Sec
Day of the Week



 

Edited by Gambit
1 person likes this

Share this post


Link to post
Share on other sites

Thank you! I will try the DATERD instruction and let you know if this works!:-)

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