Showing results 1 to 4 of 4

Thread: Issue in reading the variable's value

  1. #1
    Join Date
    21.05.2020
    Posts
    3

    Default Issue in reading the variable's value

    Hi Team,
    1. Generally with zenon VSTA code, I will be reading the value of the variable and moving it to the text document. The issue is that at sometimes instead of getting the variable value,I am getting the variable name or sometimes variable's identification.
    2.Suddenly some of the variables were not communicating properly i.e., I was not able to read the value of the variable in the VSTA code, I was getting error and when I restarted the SCADA, I was able to read the value of that variable.
    ZENON VERSION: 7.60 SP 0 Build 36068

    Regards,
    Soundarya.

  2. #2
    Join Date
    28.02.2013
    Posts
    218

    Default Re: Issue in reading the variable's value

    Dear Soundarya,

    are you using an OnlineContainer to ensure that the variables have a proper value?

    Regards,
    Felix

  3. #3
    Join Date
    21.05.2020
    Posts
    3

    Default Re: Issue in reading the variable's value

    Quote Originally Posted by felixst View Post
    Dear Soundarya,

    are you using an OnlineContainer to ensure that the variables have a proper value?

    Regards,
    Felix



    Hello Felix,

    Thanks for considering my post.

    I am not using onlinecontainer in my code. 

    The code I have used is,
    Dim Internal_Values as string="Z_Datalog_int[1]"
     Values = Me.Variables.Item(Internal_Values).get_Value(0).To String().Trim
    objWriter.Write(Values)
    objWriter.WriteLine()



    In this code ,
    Z_Datalog_int[1] is a PLC Variable, I am just get reading the value of the variable and writing it in a text document.
    Sometimes, Instead getting the value in document , I am getting the variable name  as "Z_Datalog_int[1]" and sometimes its identification.

    Kindly help me in resolving this issue.

    Thanks and regards,
    Soundarya.

  4. #4
    Join Date
    28.02.2013
    Posts
    218

    Default Re: Issue in reading the variable's value

    Dear Soundarya,

    please check if the variable is online before using it.
    You can find various examples here in the forums. For a detailed information you could consume our (online) trainings around this topic. Please contact your sales representative to clarify options here.

    Some links that might help:

    https://forum.copadata.com/showthrea...ight=container

    https://forum.copadata.com/showthrea...ight=container

    Regards,
    Felix

Similar Threads

  1. Issue in reading the variable value
    By Soundarya in forum zenon Supervisor
    Replies: 0
    Last Post: 22nd May 2020, 05:30
  2. Variable read issue on VSTA
    By MOSA_SENMATIC in forum VSTA
    Replies: 2
    Last Post: 28th February 2020, 15:08
  3. Replies: 1
    Last Post: 31st October 2019, 13:47
  4. Reading DB from S7-318
    By allyd in forum Drivers
    Replies: 1
    Last Post: 9th June 2015, 13:21
  5. Replies: 2
    Last Post: 29th March 2011, 10:46

Posting Rules

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