Passing properties as VAR_IN_OUT variables.

stribor
2025-03-01
2 days ago
  • stribor - 2025-03-01

    I am designing a custom slider object and i ran into a problem when i want to use properties with it. I can update the basic variables if i have a slider variable defined as VAR_IN_OUT, but it does not work with properties.

    How can i achieve same functionality that some basic objects have (for example basic Slider that comes withing the codesys libraries) such that i can pass both variables and properties to it and they can be modified within the object?

    I am using Codesys V3.5 SP20 Patch 5.

     
  • tvm - 2 days ago

    Use a VAR_INPUT for properties. The reason for the error is that you can't get a reference to a property. Using a VAR_INPUT will copy the property to an input variable.

     

Log in to post a comment.