Showing results 1 to 2 of 2

Thread: date and time display using variable

  1. #1
    Join Date
    24.04.2012
    Posts
    17

    Ausrufezeichen date and time display using variable

    Hi..
    i have a IO variable type of DINT. My PLC will write date/time of the particular event which i have to show in the HMI as a status.
    how do i can represent it.
    i have two tags, one for date and one for Time.
    can any one suggest me what to do.

    i'm using Zenon 7.0
    Thanks&Rgds,
    Paruvathakumar

  2. #2
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    831

    Default Re: date and time display using variable

    The solution depends if you want to show the received date and time in screen element or if you want that this IO variable has timestamp according date and time from PLC, so this timestamp should be visible in AML, CEL, Historian etc.

    Some drivers are automatically supporting external timestamps, what driver you are using?
    What is the format of date and time register in PLC?

    To answer in general:
    When you want that the IO variable has the timestamp got from date and time delivered by PLC then best would be when you can communicate with this PLC using a driver supporting "Realtime stamping", check the data sheet of your driver. If the driver supports it then look in the driver documentation for more information.
    Not all drivers can support such feature as not all communication protocols give general solution for date and time of events, e.g. in Modbus there is no general solution and every PLC manufacturer creates his-own formats.

    If realtime timestamps are not supported in the driver then the Clock element can display date and time on screen. The Clock displays not only current PC time but also can display data&time from value of linked variable (tag). So when the date and time comes from PLC in some additional variable as Unix Time then it can be linked directly with Clock element. When it comes in two tags then must be calculated to Unix Time in zenon Logic (straton) or in simple cases can be calculated using MATH driver.

    When you need "manualy made" timestamps for AML, CEL etc then you can use zenon Logic (straton) and mirror (calculate) all 3 variables got from PLC: the value of IO, date and time - into single stratonNG variable with this value and external timestamp. And then in zenon you show stratonNG variables instead directly PLC variables.

Similar Threads

  1. Display Variable Name
    By knubla in forum zenon Supervisor
    Replies: 1
    Last Post: 30th November 2012, 10:12
  2. Changing date & time of a panel during runtime
    By batabaha in forum zenon Operator
    Replies: 1
    Last Post: 15th April 2012, 23:35
  3. variable type time didn't appear in zenon
    By johnny in forum straton / zenon Logic
    Replies: 3
    Last Post: 16th January 2009, 12:11
  4. Limit Text - Display ID or Name of variable
    By craigdouglas in forum zenon Supervisor
    Replies: 5
    Last Post: 9th December 2008, 15:23
  5. compare time variable with system time
    By flajoso in forum VBA
    Replies: 7
    Last Post: 25th August 2008, 06:47

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •