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.
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.
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.
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. /:
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.
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
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.
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.