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-09-2022 11:21 AM - edited 02-09-2022 02:58 PM
I am trying to read/write a global variable of a PLC program which is published on the datalayer. My program does not seem to be able to access the variable written on the datalayer. Is there some examples of writing/reading to Datalayer I can access? Or a How to for it? (I cannot find any myself)
Or is it an issue of not being able to read/write booleans?
Edit: I have managed to narrow down the issue a bit, reading anything from the datalayer seems to work just fine. However writing to the datalayer seems to still be an issue, no matter what type of variable I try to write. Even directly writing what is being read does not seem to work, and keeps sending the DL_Type_Mismatch error.
uiState is a UInt16. does that cause an issue?
Thank you
Solved! Go to Solution.
02-09-2022 03:23 PM
Hello,
Yes there is a How to Use Graphical Programming in the developR series on YouTube. It's about a simple Pick and Place application.
There our expert does a digital write to a PLC Variable in the Data Layer.
Maybe this example can help you.
Best regards,
Nick
02-11-2022 02:16 PM
There are different possibilities how to read an write variables:
See our online documentation for further information.
02-11-2022 02:26 PM
Thank you.
I managed to write Booleans, and work around in that manner. However Integers still did not work. I will try with the IPC workaround or writing it directly as a JSON instead of the integer.