Showing results 1 to 2 of 2

Thread: To Write Value in Variable with Status

  1. #1
    Join Date
    14.09.2017
    Posts
    11

    Default To Write Value in Variable with Status

    Hello,

    Is it possible to write the variable with status in zenon?
    I have tried using below program.

    Sub Dummy()
      thisProject.Variables.Item("T01_1_2_Command").SetValueWithStatusEx 1, 1078067200, 65545, Now, 666
    End Sub

    Using this program I Get the value of variable but status is not updated.
    Variable used of IEC60870_104 driver (TID=45,COA=1, IOA=2).

    Please suggest any setting to do.

    Regards,
    Rahul I.


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

    Default Re: To Write Value in Variable with Status

    In IEC60870 protocol the command variables are 'write-only'; and the T45 communication frame (ASDU<45>) contains only value; no status (quality), no timestamp. So, when you execute this macro, it will happen exactly the same as when you set value to this variable via screen element or function 'write set value' (or action in command processing): the driver sends the value to the PLC (to 870-slave) as a 'direct execute' command. 
    The driver sends only the value - as it is no technical possibility to send anything more. And when PLC responds this command - then the driver updates the value of the zenon T45 variable; and also updates the timestamp and status of this variable according this response from slave.

    In case of command execution in IEC60870 protocol (assuming the 'direct execution', so no 'Select' before): after set value to the command variable the driver will update the value, timestamp and status up to 3 times: send command (activation), received acknowledge (activation confirmation) and received termination. See variable status bits COTx ('Cause of Transmission').    

    Note: to make the iec870 driver to send the 'Select' you would have to use module Command Processing (the Energy Edition). In this driver you cannot trigger 'Select' by VBA, nor by "normal" set value from screen elements or functions.

Similar Threads

  1. Write a complete name of the user to string variable
    By navaneet in forum zenon Supervisor
    Replies: 2
    Last Post: 14th October 2013, 09:11
  2. How to monitor the variable status on HMI
    By cypress329 in forum zenon Supervisor
    Replies: 1
    Last Post: 29th February 2012, 05:48
  3. Replies: 2
    Last Post: 22nd September 2011, 01:32
  4. alarm status from variable
    By westbaaam in forum VBA
    Replies: 5
    Last Post: 7th October 2009, 05:43
  5. Change variable status
    By brada in forum VBA
    Replies: 5
    Last Post: 13th February 2008, 17:55

Posting Rules

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