Back to top
Reading VBUS.VALUE from EtherCAT AKD in PCMM doesn't work
Any ideas why this doesn't work? PCMM, AKD on EtherCAT, v3 of KAS IDE.
Submitted by BAJ Fri, 03/29/2019 - 16:55
DriveParamRead function block has an Execute input, which means it has a built in rising edge trigger. It cannot be run constantly, as these function blocks are reading parameters not at the cyclic EtherCAT rate like PDO parameters, but through a slower back channel that can take around 20ms to do a read, and only one can be active per EtherCAT device at a time. Looks like you put the function block directly to the power rail in the ladder editor, so it will try to run once the first time your project starts. Since EtherCAT takes awhile to get up and running, it failed.
Below I tested this function block out and it works on my system after adding a variable before the Execute input to wait until the EtherCAT network is up and running before running. If you want to constantly monitor VBUS, you can add a BLINK or other timer to read at set intervals.
Submitted by Joe Parks Mon, 04/01/2019 - 05:43