Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

CodeSys scripting command

labview
2013-11-06
2014-07-08
  • labview - 2013-11-06

    Hello there,

    I wish to write/select value into a "Value" field such as Off, -10V to 10V, -150mV to 150mV & etc under Module Configuration(Kindly refer to screenshot below), what would the correct scripting command? In future, how would I know which is correct command to use for other purpose I need to use as there is alot of scripting commands in the scripting command help.

    Many Thanks.

    IMG: Write_Script.jpg

    IMG: For_Python.jpg

     
  • Anonymous - 2013-11-07

    Originally created by: M.Schaber

    Hi, LabView,

    labview hat geschrieben:
    I wish to write/select value into a "Value" field such as Off, -10V to 10V, -150mV to 150mV & etc under Module Configuration(Kindly refer to screenshot below), what would the correct scripting command?

    The functionality to configure device parameters via Scripting was implemented for the issue CDS-22506 which will be released with V3.5 SP4 (currently scheduled for December).

    As a side note, the Test Manager already has device parameter configuration functionality.

    labview hat geschrieben:
    In future, how would I know which is correct command to use for other purpose I need to use as there is alot of scripting commands in the scripting command help.

    Reading the help file should be the easiest way to find out what purpose those commands fulfil.

     
  • Damian - 2014-04-03

    Hi

    M.Schaber hat geschrieben:
    The functionality to configure device parameters via Scripting was implemented for the issue CDS-22506 which will be released with V3.5 SP4 (currently scheduled for December).

    Has anybody a example for this new functionality?
    What interface must I use to configure device parameters?

    Thanks for the help
    Damian

     
  • Damian - 2014-04-08

    Hi Markus,

    thank you for the examples, they are very helpful!
    Is there any possibility to get "AdditionalInterface" of a connector via python?

    Do you have a description of the property parent (IScriptDeviceConnector.parent)?
    If I call this property then I get the connectors of the device and not the parent connector of the connector.
    If I call "connector.parent" I get the same result as with "device.connectors".
    Is this correct?

    One side note: The online help "ScriptEngine.chm" is not up to date (I have CoDeSys v3.5 SP4 patch1)!

    Best regards
    Damian

     
  • Anonymous - 2014-05-02

    Originally created by: M.Schaber

    Hi,

    Right now, there is no access to the "AdditionalInterfaces" of a connector. If you can describe your use case, I can try to file an improvement.

    IScriptDeviceConnector.parent is actually meant do deliver the list of connectors (IScriptDeviceConnectorSet), it is a "parent" in the sense of the object tree, not in the sense of the connector hierarchy. You can iterate over the list and filter for the connector_role property of the IScriptConnector, which can be set to ConnectorRole.parent or ConnectorRole.Child.

    For patches, the documentation is usually not updated (exceptions exist).

    HTH,
    Markus

     
  • Damian - 2014-05-07

    Hi,

    I need the "AdditionalInterfaces" of the parent connector
    to know which child connector is valid.

    BR
    Damian

     
  • Anonymous - 2014-05-09

    Originally created by: M.Schaber

    Hi, Damian,

    Your request was filed on our Jira Database as issue CDS-39164, so it will be fixed eventually.

    HTH,
    M.Schaber

     
  • Anonymous - 2014-07-08

    Originally created by: M.Schaber

    Hi, Damian,

    According to current schedule, this issue is likely to be fixed in the Version scheduled for December this year. (Probably V3.5 SP6).

     

Log in to post a comment.