get the ScalarArray_Int32 values from script

get the ScalarArray_Int32 values from script

  • 24 Juli 2019 um 2:32 pm #34153

    hello everyone,

    I have a OPCUA server which exposes a tag of type ScalarArray_Int32 and I would like to access its elements.

    I have made a screen with a button and an EditDisplay
    I have followed the Tutorial (refering to Man_Eng_Next3.0_Tutorial.pdf) at the section 4.8 and I have configured the options for the editDisplay.
    So I wrote [0] into the „expression Code for Input“ textbox tryig to access the firts element but when I run the HMI what I get is a red triangle and the text „null“ into the EditDisplay.

    then I have tried to do it from script.
    So I have created a script and I call it by pressing the button.
    Inside the script editor, pressing ALT+BACKSPACE i can see all the variables and there is my variable: „Station0_ExpMethods_valoriTasto_valoriTasto_ScalarArray_Int32“
    But if I try to show it through MsgBox Station0_ExpMethods_valoriTasto_valoriTasto_ScalarArray_Int32(0) it does not work and i got the error:
    An error occured in the script „script1“ the method or operation is not implemented

    can anyone help me?

    cheers Giacomo

  • 26 Juli 2019 um 12:10 pm #34212


  • 26 Juli 2019 um 12:49 pm #34219
  • 26 Juli 2019 um 1:51 pm #34221


    yes I have tried to run this script:

    Dim x = ScriptDocument.GetVariableValue(„valoriTasto“)(0)
    MsgBox x

    but i got the error: The method or operation is not implemented.

    this is the physical tag address:
    OpcClientDriver.Station=Station0|LinkType=1|AN=Quickstart Reference Server|IP=\ExpMethods\&\valoriTasto\&\valoriTasto&\valoriTasto\&\valoriTasto&\valoriTasto&\ScalarArray_Int32|EU=opc.tcp://localhost:62541/Quickstarts/ReferenceServer|RP=/2:ExpMethods/2:&/valoriTasto/2:&/valoriTasto&/valoriTasto/2:&/valoriTasto&/valoriTasto&/ScalarArray_Int32|RN=ns=2;s=/valoriTasto/valoriTasto/ScalarArray_Int32


  • 31 Juli 2019 um 3:02 pm #34244

    Hi Giacomo,
    What I can suggest, is to try before in a display with the simple syntax in the expression code for input [0] (for the first array element , then [1] for the second and so on)
    If it works, you can move within the code if needed. I thinlk it is necessary to proceed in this way to make sure that you have good communication before.
    I don’t know your script context so it is not easy to help…contact the Progea support sharing your example project.
    I always get „real time“ answers! (few days) They are very good guys!

  • 1 August 2019 um 11:01 am #34255

    hi, i have solved it.
    Actually was just a matter of configuration.

    Thank you for the answerby the way.

  • 6 August 2019 um 12:08 pm #34284

    good! I’m glad that you solved the issue!

Du musst angemeldet sein, um auf dieses Thema antworten zu können.