SoftMotion, accessing PDO input data via object ref/pointer

Kim
2015-07-13
2015-07-14
  • Kim - 2015-07-13

    Sent this to the the support email but I thought I was going to give the community a shot at it as well and maybe speed up the process.

    I want to know how I can access specific PDO data by code WITHOUT the need of mapping a variable to the EtherCAT I/O mapping. The reason for this is that since our users will be copy/pasting the objects when they multiply axes, I want to keep the required adjustments to a minimum.

    1. Let's say we have this slave drive and motor object.

    2. The slave drive has this PDO defined. In my case I'm interested in the Digital Inputs value read from16#60FD.

    3. Now, I know that normally you would simply use the EtherCAT I/O Mapping tab and map a variable to the Digital Inputs, but this is exactly what I'm trying to avoid.

    4. If I monitor Servo1, I can see that the data I want is actually available in Servo1.in.dwDigitalInputs which seems to update correctly. However, this structure is a local variable and can't be accessed from code, only from within the watch window.

    5. How can I access the data I need using either the motor object or its parent slave object (the L7NH drive)?
      Please note that reading the data with extra SDO:s isn't an option. It's already transfered by the cyclic PDO and should be available somehow

    Any help appreciated, I'm really stuck on this one...

    Kim Hansen
    Beijer Electronics Automation AB

    IMG: Bild

    IMG: Bild

    IMG: Bild

     
  • singleton - 2015-07-14

    Hi,
    you can access through IoConfig_Globals:

    IoConfig_Globals.<YourDriveName>.<Paramter>
    
     
  • Kim - 2015-07-14

    singleton hat geschrieben:
    Hi,
    you can access through IoConfig_Globals:

    IoConfig_Globals.<YourDriveName>.<Paramter>
    

    Thanks for the reply, but that doesn't work because the ETCSlave object (which the drive uses) does not contain properties for the information I want to access.

    Edit:
    I have now received answer from Codesys Support that this will be doable in v3.5 SP7, will have to use I/O-mapping until then.

     

Log in to post a comment.