Showing results 1 to 4 of 4

Thread: variable type time didn't appear in zenon

  1. #1

    Default variable type time didn't appear in zenon

    I am trying to use a variable type time in straton but this variable didn’t appear in zenon editor,
    Note that all other type appear without problem

  2. #2
    Join Date
    05.09.2007
    Posts
    8

    Default Re: variable type time didn't appear in zenon

    Quote Originally Posted by johnny View Post
    I am trying to use a variable type time in straton but this variable didn’t appear in zenon editor,
    Note that all other type appear without problem

    Hi johnny,

    The data type TIME is not supportet by the so called integrated solution. Therefore this variable doesn't appear in zenon Editor.

    In order to exchange time values between straton and zenon just convert (any_to_*) the value to e.g. DINT.

    All the best

  3. #3

    Default Re: variable type time didn't appear in zenon

    Quote Originally Posted by juergenresch View Post
    Hi johnny,

    The data type TIME is not supportet by the so called integrated solution. Therefore this variable doesn't appear in zenon Editor.

    In order to exchange time values between straton and zenon just convert (any_to_*) the value to e.g. DINT.

    All the best
    hii,
    thank you very much for your reply
    and in zenon editor how can convert type DINT for example to type time

  4. #4
    Join Date
    05.09.2007
    Posts
    8

    Default Re: variable type time didn't appear in zenon

    Quote Originally Posted by johnny View Post
    hii,
    thank you very much for your reply
    and in zenon editor how can convert type DINT for example to type time

    Hi Jonny,

    You can convert the data type DINT into TIME format via VBA.

    Another possibility is to modyfy the DINT-value in straton in order to be able to show h, min, sec in zenon. Like this:

    diTime := any_to_dint (tTimeBasic);

    rTimeS := trunc( (any_to_real(diTime)/1000.0 )); //truncate millisconds

    diTimeSec := any_to_dint (rTimeS) - diTimeMin * 60 - diTimeHr * 3600; //calculation of seconds
    diTimeMin := (any_to_dint (rTimeS / 60.0)) - diTimeHr * 60; //calculation of minutes
    diTimeHr := any_to_dint (rTimeS / 3600.0); //calculation of hours
    //with that you can show three numerical values in zenon

    strTime := any_to_string(diTimeHr) + 'h' + any_to_string(diTimeMin)
    + 'min' + any_to_string(diTimeSec) + 's'; //concatanate in a string
    //with that you can show the time in a Link text element in zenon


    With these variable definitions:
    VAR
    tTimeBasic : TIME := T#12h13m14s ;
    strTime : STRING(15) ;
    rTimeS : REAL ;
    diTimeSec : DINT ;
    diTimeMin : DINT ;
    diTimeHr : DINT ;
    diTime : DINT ;
    END_VAR


    Best regards,
    Jürgen

Similar Threads

  1. Variable von Excel über DDE-Treiber in Zenon darstellen
    By axel_sch in forum zenon Supervisor
    Replies: 1
    Last Post: 26th November 2008, 08:56
  2. compare time variable with system time
    By flajoso in forum VBA
    Replies: 7
    Last Post: 25th August 2008, 06:47
  3. Processor type
    By sebastiank in forum zenon Operator
    Replies: 0
    Last Post: 19th September 2007, 16:15
  4. more than one driver of same type
    By sebastiank in forum zenon Operator
    Replies: 0
    Last Post: 18th September 2007, 07:36

Posting Rules

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