Is the CANOpen slave (CanRemoteDevice) capable of transmitting Error Control Service (ECS) e.g. heartbeat?
(I cannot find any cfg option to do that. See figure. I use CoDeSys V3.)
Regards,
Edwin.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What is the "Edit SDO parameter area"? If it is a slave then it is up to the Master to configure the heartbeat. It also looks like it is relying on an eds file. Check and see if the heartbeat is configured in the eds file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the "Edit SDO parameter area" user defined SDO can be created.
The button generates / exports an eds file.
In that eds file, the heartbeat entries are available: [1017] ParameterName=Producer Heartbeat Time [1016] ParameterName=Consumer Heartbeat Time
Also Guard entries are available: [100C] ParameterName=guard time [100D] ParameterName=life time factor
This gives an indication that the slave has heartbeat functionality.
How can I activate the CANOpen device's heartbeat (without doing any SDO from the master)?
Regards,
Edwin.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well if it is CANopen compliant it is up to the Master to configure it. But you may on the CANopen side have defaults. You may have to modify the EDS file to add default parameters. Maybe CoDeSys is using the defaults until it is changed by the master? The Slave will automatically boot up and send a heartbeat message for each state that it changes to , Bootup, Pre-op etc..
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In the generated eds file, the [1017] Producer Heartbeat Time equals 100.
But when I read this entry, with SDO, on an actual device, it is 0. (The device is not using the default value!)
After I wrote a value to the enty, with SDO, on an actual device, the device started with producing heartbeats. (That is a success.)
Does this mean that I need a CANOpen master to cfg the device?
I want the device to start with heartbeat on it's own, without any CANOpen master. Is there any work-around e.g. transmit the heartbeat manually, by a function block?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
A nice work-around would be that the CANOpen slave enables it's own heartbeat.
By using the CIA405.SDO_WRITE4 function, write a value in [1017] Producer Heartbeat.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Iβll write a value directly in the driver, like this:
pm_uiHeartbeatTime := ADR (CANObject.m_uiHeartbeatTime);
pm_uiHeartbeatTime^ := 500;
(Itβs dirty and not maintainable but it works.)
Regards,
Edwin.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is the CANOpen slave (CanRemoteDevice) capable of transmitting Error Control Service (ECS) e.g. heartbeat?
(I cannot find any cfg option to do that. See figure. I use CoDeSys V3.)
Regards,
Edwin.
What is the "Edit SDO parameter area"? If it is a slave then it is up to the Master to configure the heartbeat. It also looks like it is relying on an eds file. Check and see if the heartbeat is configured in the eds file.
In the "Edit SDO parameter area" user defined SDO can be created.
The button generates / exports an eds file.
In that eds file, the heartbeat entries are available:
[1017] ParameterName=Producer Heartbeat Time
[1016] ParameterName=Consumer Heartbeat Time
Also Guard entries are available:
[100C] ParameterName=guard time
[100D] ParameterName=life time factor
This gives an indication that the slave has heartbeat functionality.
How can I activate the CANOpen device's heartbeat (without doing any SDO from the master)?
Regards,
Edwin.
Well if it is CANopen compliant it is up to the Master to configure it. But you may on the CANopen side have defaults. You may have to modify the EDS file to add default parameters. Maybe CoDeSys is using the defaults until it is changed by the master? The Slave will automatically boot up and send a heartbeat message for each state that it changes to , Bootup, Pre-op etc..
Thank you, spfeif, for your answer.
In the generated eds file, the [1017] Producer Heartbeat Time equals 100.
But when I read this entry, with SDO, on an actual device, it is 0. (The device is not using the default value!)
After I wrote a value to the enty, with SDO, on an actual device, the device started with producing heartbeats. (That is a success.)
Does this mean that I need a CANOpen master to cfg the device?
I want the device to start with heartbeat on it's own, without any CANOpen master. Is there any work-around e.g. transmit the heartbeat manually, by a function block?
A nice work-around would be that the CANOpen slave enables it's own heartbeat.
By using the CIA405.SDO_WRITE4 function, write a value in [1017] Producer Heartbeat.
I found a work-around.
Iβll write a value directly in the driver, like this:
pm_uiHeartbeatTime := ADR (CANObject.m_uiHeartbeatTime);
pm_uiHeartbeatTime^ := 500;
(Itβs dirty and not maintainable but it works.)
Regards,
Edwin.