FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We are updating our platform to a new
system.
Read more: Important
information on the platform change.
02-23-2023 11:09 PM
Hello,
I have a question about using the CXA_Datalayer library (DL_ReadNode) to read drive status vs CXA_Ethercatmaster library (IL_EcatSoeRead).
What are the advantages to using the datalayer vs the other method? Logically, it just seems easier to simply read the parameter I want, using the known ethercat address (say 1001), vs having to build a query message using DL_BrowseNode to get the list of serialnumbers from the Datalayer, and then read the actual status with DL_ReadNode. I can do all that with IL_Ecat_SoeRead much easier.
Thanks in advance,
James
Solved! Go to Solution.
02-28-2023 03:53 PM - edited 02-28-2023 05:22 PM
Hello James,
I would always recomend the libraries and functions provided for your specific use case (in this case CXA_Ethercatmaster.IL_ECATSoeRead). Most of them already have checks, timeouts and examples included in them and are much easier to implement.
However not all Datalayer Nodes have a PLC library or FB´s. For this case you could build your own FB´s using CXA_Datalayer.
(Just to clarify: EoE (EthernetOverEtherCAT) as mentioned in the title has nothing to do with both cases)
Edit/Followup:
I just saw that you want to read the SoE Drive status word (S-0-0135). This is a realtime variable which can be read in realtime through the "DataLayer_Realtime" object of the ctrlX Core in PLC-Engineering. Please take a look at the documentation for more information.
Realtime Data from the EtherCAT bus can be read once the EtherCAT-Master (and the Slaves) are in State "SafeOp" or "Op".
Both CXA_Datalayer and CXA_Ethercatmaster do not access the data in realtime.