FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
02-08-2023 12:14 PM - edited 02-08-2023 12:20 PM
Good morning, I have a problem changing the state of the ETHERCAT master from INIT to OP in Node-RED. I was able to update its state directly from the CORE by writing a JSON with the following structure: {"request": {"newState": "op"}} and by using HTTP went OK too, but when try to modify it from Node-RED, it gives me the following error: CtrlxProblemError: DL_TYPE_MISMATCH. I have tried the methods WRITE and CREATE in the data layer request node, at the path fieldbuses/ethercat/master/instances/ethercatmaster/admin/fieldbus_status/master_state, but both give me the same error. The JSON structure sent by the payload is the same as the one I write at the CORE. I have attached several photos of how everything is configured. How can I modify this value with data layer request node? Thank you so much!
Solved! Go to Solution.
02-08-2023 01:22 PM - edited 02-09-2023 09:07 AM
A "Write" must be used and the "Payload" switched to "value + type (json)". Then send following payload:
msg.payload ={"type": "object", "value": {"request": {"newState": "op"}} }
return msg;
See all my standard examples on github. Or see also this thread for another complex example.
02-09-2023 08:48 AM
Thank you so much, It works properly!!