Writing a VALUE into a input function value....Enquiry

labview
2013-12-19
2014-01-02
  • labview - 2013-12-19

    Hi there,

    I have a question,

    1. How to write a value into a input Function Block(e,g CHxInput) via Test Manager.scripting -> ExecuteScript using Python command?

    Many Thanks.

     
  • mkeller - 2014-01-02

    Hi.

    To write one or more values through the monitoring you need to get the online application, set/prepare the values and write them through the online application.

    The following example prepares one value and writes it to the device:

    onlineApp = online.create_online_application()
    onlineApp.set_prepared_value("PLC_PRG.counter", "5")
    onlineApp.write_prepared_values()
    

    If you want all the prepared values to be forced you have to use the method force_prepared_values().

    For more details you should have a look at the ScriptEngine online help which you can find in the directory "CODESYS\Online Help" of the CODESYS installation directory.

    Regards,
    Martin

     

Log in to post a comment.