FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
08-21-2024 07:59 PM
I am working on a SFK-4H demo and trying to use the core came with SFK-4H. to communicate with SFK-4H I need to read and write variables between core PLC and SFK. for the same variable I can read the value using DL_ReadNode even there are some other items under the same variable
however for the same variable when I write a value to it the DL_WriteNode deosn't work. I have tried to use string to include all items into the value of DL_WriteNode and it showed function block error. I alse tried to add one item into the NodeName and write a value to it, and it didn't work either. can someone help me on that and show me how to write a value into a json format?
Thanks,
08-21-2024 08:09 PM - edited 08-21-2024 08:10 PM
@Jesse ,
The node in your first image is read-only, so that would explain the write error. I am a bit confused what exactly you are trying to accomplish based on the two images provided.
08-21-2024 10:37 PM
the same variable can be read and written. since the variables in the SFK-4H program I created are only changed through the data layer by the PLC in the core. the same variable is for an error status and is set in the SFK-4H program and PLC reads that. then like a handshaking signal, the PLC needs to reset the variable for PLC logic. the variable-25 in the state is used in the read node function and if I assign 25 into the "index" of the save-variable of cmd and assign a value to it. when clicking on the write button from the data layer the variable in the SFK-4H changes. however, when I used the DL_WriteNode it didn't work. I need to know how I can use DL_WriteNode to write a value to this variable same as in the data layer.
Thanks,
08-22-2024 02:57 PM
If you expand the metadata under the cmd node, can you provide the type? Since it is an object, you may need to retrieve the type in the PLC and write to the components. I'm unfamiliar with the SFK, but maybe this type is available in the PLC library?
08-26-2024 02:57 PM
Thank you Sgilk. however, I don't see this data type in the PLC library "types/smartfunctionkit/backend/variables/cmd/store-variable-double-parameters". I did try using uint32 and didn't work. The main issue is using a PLC function block to assign a value to the follow...
.
09-04-2024 10:19 AM
The flatbuffer objects of the Smart Function Kit for handling are not part of the standard installation of ctrlX PLC Engineering, as is it is not intended to use them from the PLC. You will need a library including the flatbuffer functions/descriptions to get access. You can get in direct contact via our homepage: https://www.boschrexroth.com/en/de/smart-mechatronix/smart-function-kit-for-handling/ in order to discuss your usecase.