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.
Let's say we have this slave drive and motor object.
The slave drive has this PDO defined. In my case I'm interested in the Digital Inputs value read from16#60FD.
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.
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.
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
Let's say we have this slave drive and motor object.
The slave drive has this PDO defined. In my case I'm interested in the Digital Inputs value read from16#60FD.
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.
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.
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
Hi,
you can access through IoConfig_Globals:
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.