GenTime Type |
Top Previous Next |
GenTime is a date and time data type originally defined and added to this Driver for use with Elipse Software's Generic SOE Reading Algorithm. It is, however, a generic data type that can be easily used with almost any PLC. In an application, that is, in values of Tags and Block Tag Elements, as well as in Tag's Timestamp field, this data type, as well as all other Driver's date and time data types, is represented by an application's native date and time data type. For more information about other date and time data types supported by this Driver, please check topic Supported Data Types. For more information about application's date and time data types, please check their respective user's manual (there are some differences between VBScript used in Elipse SCADA and the one used in E3 and Elipse Power). In the PLC or slave device, this data type is represented by a structure composed by four 16-bit registers (eight bytes), as displayed on the next table. Structure of registers
The base address (offset 0), for attribution on Tag's N4/B4 parameter accessing data, contains the year. The next register (offset 1) contains the day as the most significant byte and the month as the least significant byte. The offset 2 contains the hour represented in the most significant byte and the minutes in the least significant byte. The fourth register contains the four most significant bits of the Word representing seconds, and the remaining bits (the two least significant of the most significant and the integer's least significant byte) representing milliseconds. Notice that each Tag referencing this data type forces a Driver to read a block of four Modbus registers in the device to represent the value of each Tag or Block Element to return a valid value. Advantages of this data type are its simplicity (it is easily generated in a PLC ladder), its milliseconds precision, and its relative compression, as it does not need native support by the PLC or slave device.
|