Read PLC Timestamp into FSQL via KepServerEx

Hello Everyone,

I just started trying out FSQL with the hopes of replacing a troublesome RSSQL setup and have a quick question. In RSSQL you can create a PLC Timestamp reference by passing in an array of 7 Ints. Then that array then gets converted into a SQL DateTime and inserted into your table.

How do I got about replicating this functionality with FSQL and KepServerEx?

Thanks in advance for any help. :slight_smile:

–HandledException

P.S. I am a newbie in regards to KepServerEx as well if that matters

Are you looking to grab the time off of the PLC clock? For the AB stuff we have in-house we decided to use the Logix5000 Clock Update tool, and then leave it be. Since everything is synced, it’s then academic where you grab the time from. :slight_smile:

EDIT: I should probably mention that I have everything running on one box: FSQL, MySQL, RSLinx, KepWare (You could use Linx as the OPC Server, but KepWare let’s you address down to the boolean level on SLC’s) and the Clock Update Tool. If you don’t have the tool, it’s a free download from AB. 8)

Hope this helps!

Regards,

[quote=“JordanCClark”]Are you looking to grab the time off of the PLC clock? For the AB stuff we have in-house we decided to use the Logix5000 Clock Update tool, and then leave it be. Since everything is synced, it’s then academic where you grab the time from. :slight_smile:

EDIT: I should probably mention that I have everything running on one box: FSQL, MySQL, RSLinx, KepWare (You could use Linx as the OPC Server, but KepWare let’s you address down to the boolean level on SLC’s) and the Clock Update Tool. If you don’t have the tool, it’s a free download from AB. 8)

Hope this helps!

Regards,[/quote]
I think you misunderstood what I am trying to do. I’m not trying to get the current plc clock time, but rather a copy which I recorded awhile back that I have saved in a User Defined Type.

I need to be able to convert that time I saved (the Int[7] Array) into a DateTime for a column in my database table.

I have an attempt of mine in another thread here: http://www.inductiveautomation.com/forum/viewtopic.php?f=13&t=4534 that might provide more information about what I am trying to do as well. (Please forgive the multiple posts as I thought I might get more views if I posted again with a more specific problem)

Thanks for the continued help.

–HandledException