# DateTime tag with Omron NJ Driver

**URL:** <https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407>\
**Category:** General Discussion\
**Created:** [March 23, 2016, 7:43pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407 "2016-03-23T19:43:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [March 23, 2016, 7:43pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/1 "2016-03-23T19:43:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [March 23, 2016, 7:54pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/2 "2016-03-23T19:54:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [May 26, 2016, 9:21pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/3 "2016-05-26T21:21:52Z")

</div>

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

> [@](#):
>
> The only date/time datatype supported right now is the "DATE\_AND\_TIME\_NSEC" datatype.

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?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 27, 2016, 1:51am UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/4 "2016-05-27T01:51:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [May 27, 2016, 3:05am UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/5 "2016-05-27T03:05:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [May 27, 2016, 1:23pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/6 "2016-05-27T13:23:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![k.wijngaarde](https://avatars.discourse-cdn.com/v4/letter/k/aeb1de/32.png) [@k.wijngaarde](https://forum.inductiveautomation.com/u/k.wijngaarde)\
**Post date:** [December 20, 2019, 1:20pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/7 "2019-12-20T13:20:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![k.wijngaarde](https://avatars.discourse-cdn.com/v4/letter/k/aeb1de/32.png) [@k.wijngaarde](https://forum.inductiveautomation.com/u/k.wijngaarde)\
**Post date:** [March 16, 2020, 10:18am UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/8 "2020-03-16T10:18:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [July 24, 2020, 9:12pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/9 "2020-07-24T21:12:19Z")

</div>

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.

 ![image001](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/9/2940a31c585f128bbbeb6f3f703f6801523f524c.png)

---

<div class="post-metadata">

**Author:** ![OmronOmicron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/omronomicron/32/36705_2.png) [@OmronOmicron](https://forum.inductiveautomation.com/u/OmronOmicron)\
**Post date:** [February 24, 2022, 6:07pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/10 "2022-02-24T18:07:24Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 24, 2022, 8:54pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/11 "2022-02-24T20:54:25Z")

</div>

> [@Kevin.Herron](#):
>
> I can only imagine this is supposed to be Zulu/UTC-0/GMT.

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

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 24, 2022, 8:55pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/12 "2022-02-24T20:55:45Z")

</div>

> [@OmronOmicron](#):
>
> configuring Format String

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

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [February 24, 2022, 9:14pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/13 "2022-02-24T21:14:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [February 24, 2022, 9:27pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/14 "2022-02-24T21:27:27Z")

</div>

> [@pturmel](#):
>
> Or rather, the CPU doesn’t _really_ do time zones.

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.

---

<div class="post-metadata">

**Author:** ![OmronOmicron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/omronomicron/32/36705_2.png) [@OmronOmicron](https://forum.inductiveautomation.com/u/OmronOmicron)\
**Post date:** [February 24, 2022, 9:54pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/15 "2022-02-24T21:54:18Z")

</div>

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 🙂

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/7/e7ad0f2f43910f8b9b9ac2687c2c60ec695c4a6f.png)

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.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/0/003082944730e24e6cfb31ee2c12852608225364.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 24, 2022, 9:57pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/16 "2022-02-24T21:57:47Z")

</div>

> [@Kevin.Herron](#):
>
> the “Date/Time Offset” setting

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

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [February 25, 2022, 12:40am UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/17 "2022-02-25T00:40:45Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![OmronOmicron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/omronomicron/32/36705_2.png) [@OmronOmicron](https://forum.inductiveautomation.com/u/OmronOmicron)\
**Post date:** [February 25, 2022, 11:40am UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/18 "2022-02-25T11:40:48Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/5/3552150dcbfa2bb8fc079f4459c1c06bc912f6de.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/7/e7bf2fcb6e96b65ca31aaf02dc4bca46d3f2c3ae.png)

---

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [September 8, 2022, 7:14am UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/19 "2022-09-08T07:14:57Z")

</div>

Did you get any more luck with this? Ready DATE\_AND\_TIME as an array?

---

<div class="post-metadata">

**Author:** ![OmronOmicron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/omronomicron/32/36705_2.png) [@OmronOmicron](https://forum.inductiveautomation.com/u/OmronOmicron)\
**Post date:** [September 9, 2022, 4:52pm UTC](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407/20 "2022-09-09T16:52:39Z")

</div>

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.

[Next page](https://forum.inductiveautomation.com/t/datetime-tag-with-omron-nj-driver/11407.md?page=2)
