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

DSP402 Axis parameters

Omar Ampyx
2018-10-01
2018-10-18
  • Omar Ampyx - 2018-10-01

    Hi everyone,

    Is there a way to set the values of the DSP402 related parameters in ST?

    Thank you in advance,
    Omar

     
  • josepmariarams - 2018-10-01

    Axis_ref_sm3 has a lot of parameters declared as var_input. You can read or write them directly as fpositionfactor or settotorque....

    Sent from my Moto G (5S) Plus using Tapatalk

     
  • Omar Ampyx - 2018-10-02

    Hi Josep,

    Unfortunately the parameters in an Axis.DSP402_Statemachine (axis of type AXIS_REF_ETC_DS402_CS) are not inputs, the compiler won't allow you to write them.

    These parameters can be changed in the device editor but I would like to have their parametrization in ST.

    Regards,
    Omar

     
  • josepmariarams - 2018-10-02

    Hi.

    Axis_ref_etc_ds402.... Extends from axis_ref_sm3. It has the same variables as _sm3 and any others. (I recomends to you to treat the axis as sm3 it make your code more portable).

    My axis_ref is axis_ref is etc_ds402... Too.

    Sent from my Moto G (5S) Plus using Tapatalk

    IMG: Bild

     
  • Omar Ampyx - 2018-10-02

    Hi Josep,

    Still your example does not work for the parameters related to the DSP402_Statemachine, they cannot be accessed in the same way as in your example.

    Regards,
    Omar

     
  • josepmariarams - 2018-10-02

    Hi

    What do you want to do?

    StateMachine is an enum which is controlled by the axis and change when you give orfers to the axe.

    Sent from my Moto G (5S) Plus using Tapatalk

     
  • Omar Ampyx - 2018-10-03

    Hi Josep,

    I am taking about these parameters (see attached).

    Regards, Omar

    IMG: Capture.JPG

     
  • josepmariarams - 2018-10-08

    This is not a canocical form, but works:

    IMG: foto1.png

    IMG: foto2.png

    IMG: foto3.png

     
  • Omar Ampyx - 2018-10-09

    GrΓ cies Josep . I'll try it out.

    Regards, Omar

     
  • Omar Ampyx - 2018-10-18

    It works thank you!

    Gr, Omar

     

Log in to post a comment.