DateTime tag with Omron NJ Driver

I was wondering if it is possible to read in an Omron NJ “TIME” datatype tag into Ignition using the Omron NJ Driver.

I noticed that it seems to be compatible with Ignition because i was able to import it into the Omron NJ Driver tag table without issue, and is given the DataType “UINT_BCD” on Ignition side.

What is the best way to create a tag in Ignition to read this from the Driver? I’ve tried Integer, Dataset, Date and they all do not seem to work.

The only date/time datatype supported right now is the “DATE_AND_TIME_NSEC” datatype.

Neither the Omron documentation nor the engineers we had contact with were able to tell us the byte format of the other datatypes. As soon as we get this information the driver should gain support these additional datatypes.

Just having a look into this again for a different application.

I don’t seem to have this datatype available in Sysmac Studio. I have “TIME”, “DATE”, “TIME_OF_DAY”, “DATE_AND_TIME”.

Do you know what version of Omron software you were using to get that datatype?

Not trying to put words in Kevin’s mouth, but I think he meant "The only date/time datatype supported by Ignition’s OPC/UA infrastructure right now is the “DATE_AND_TIME_NSEC” datatype. Omron doesn’t have that, so Dates & Times don’t convert.

Ah ok thanks.
I have decided to use the Omron function “DTToSec” to provide a LONG INT variable which represents UNIX time in seconds. This is then read by Ignition OPC Server and written to SQL using a transaction group. In order to have timestamp data in a chart/table i need to make convert the INTEGER into a date time format with my SQL Query.

We’ll be meeting with an Omron engineer next month; I’ll see if we can get some more information on this.

Is it now possible to link datetime from sysmac directly within ignition?
| The variable in the iport list is placed as unit_BCD data type.

Only within the designer> tagbrowser this variable will not be available

Is it now possible to link datetime from sysmac directly within ignition?
The variable in the iport list is placed as unit_BCD data type.

Only within the designer> tagbrowser this variable will not be available

Ignition 8.0.15 has support for the date/time datatypes.

Our best effort at finding documentation on these datatypes suggests that DATE_AND_TIME is the number of nanoseconds since the epoch (1970-01-01T00:00:00). I can only imagine this is supposed to be Zulu/UTC-0/GMT.

Currently our driver reads the same values for DATE_AND_TIME as Kepware does over OPC UA. We’ve had one customer argue that this is somehow incorrect but I’m not sure how else the value could possibly be interpreted, so if any of you have insight it would be appreciated.

2 Likes

I am in the same boat trying to communicate from the NJ controller using a DATE_AND_TIME data type.
I have tried configuring Format String to what @Kevin.Herron posted with no success. The live value I am getting is simply “Bad.” Bear with me, I am fairly new to Ignition. Some help would be greatly appreciated!

Unfortunately, no. I’ve since discovered that it is epoch nanoseconds, but in the CPU’s local time zone. Or rather, the CPU doesn’t really do time zones. So, always configure Omron CPUs to UTC. /:

That is in the CPU. In Ignition, make your tag datatype a datetime, and leave the source type to auto.

Yes i think i discovered this too… which is awfully confusing. We had our CPU set to NZT and it was very confusing assuming that the EPOC was UCT-0, when it actually wasn’t. Lesson learned the hard way there.

Yes, we eventually got some further documentation and clarification from an Omron engineer… these things have an idiotic implementation of date/time, timezones, and DST, which lead to the introduction of the “Date/Time Offset” setting on the driver so you can manually apply corrections as needed.

1 Like

So I am using an array[500] of DATE_AND_TIME. Attached is a picture of the raw tag editor configuration of index[1] of the array. The config you mentioned is how it automatically setup the data type and no matter how I configure it in ignition, it continues to overlay “bad” without giving me much of a troubleshooting direction to take. I’ve also tried creating a Var in sysmac studio with the data type TIME and a Var with the data type DATE and i get the same “bad” overlay in the “value” column. I am fairly certain it is an issue on my end so please be patient with me :slightly_smiling_face:

Also here is an attachment of the Variables in sysmac studio that I am using. I made a STRUCT for this example but I already tried with just a simple DATE_AND_TIME Var before trying the STRUCT.

Ah, missed that. And yes, I heartily agree with the “idiotic” characterization.

Silly question but have you exported variable table from the PLC and imported it into the NJ driver?
Can you browse the device in the Gateway OPC-UA client and get the right value?

So I am only able to get a reading when create a singular Var of DATE_AND_TIME. If I pass a STRUCT with multiple member (all being arrays), it will overlay “bad” on the value for each array.
“SCADAUserLogged” is the STRUCT and the only member I am able to see a live value for in ignition is the “SCADAUserLogged.SCADAUserLogged” becasue it is an LINT and all the other members are date, time, or date and time.


Did you get any more luck with this? Ready DATE_AND_TIME as an array?

No sir! I ended up just passing one Tag over and then scripted my way through the rest of it to obtain date and time logging them into a db.