Jump to content

Recommended Posts

Posted

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!


Posted (edited)

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
  • Like 1
Posted

DATE_AND_TIME is an IEC standard data type.  If you are using GX Works2, your older PLCs may not have support for this data type.  The newer PLCs using GX Works3 all support this format.  Since nothing was stated as to the CPU model, that's about all the help we can provide.  

Posted

DATERD copies the date/time into seperate fields as integers If I remember correctly there are 6 registers.

Read the manual if you have the help files installed click on the function & press help

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
×
×
  • Create New...