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.
06-27-2022 04:28 AM
Hello Community,
our customer is testing with our Drive based ctrlX Core to control their punching gun. Currently they are trying with PLC engineering to read and write the operation log into a csv file, which will be stored on a plugged sd-card in CF01 slot.
We found that there is PLC lib called CXA_FileAsync, is this the right lib to be used?
If there is simple how-to example, it will be really helpful.
Thanks and best regards,
Hui
Solved! Go to Solution.
06-27-2022 07:21 AM
Please have also a look to this thread discussing file access out of the PLC. I will ask to add a example.
06-27-2022 07:34 AM - last edited on 09-29-2022 08:41 AM by CodeShepherd
Hi jh123,
there is an example included in the library, see screenshot.
The correct path to the SD Card would be eg. "/media/mmcblk1p1/testfile.txt", you have to mount the card before in the Settings --> Storage,
The name can be found in the web frontend "Settings --> Storage" as well
The file in the example will be written to appdata/plc/run/linux-gcc-aarch64/data. See also this post.
You could read/write it from there eg. with Node-RED, see second screenshot:
Path: /var/snap/ctrlx-node-red/current/solutions/activeConfiguration/plc/run/linux-gcc-aarch64/data/testfile.txt
06-27-2022 10:08 AM
Thanks a lot!
An example will be really useful.
06-28-2022 08:24 AM
Hello, What if the file is stored on a network pc? How to read, write and post csv file stored in a network pc? Thanks.
06-28-2022 09:33 AM
Hi YT123,
we have not yet a native build in client to map network drives, this is on our roadmap.
As a workaround you could try Node-RED.
Regards
06-28-2022 10:13 AM
Thank you for your quick reply. We look forward to having this function soon. 😀
06-28-2022 01:43 PM
06-29-2022 06:39 AM
Hello TheCodeCaptain,
thanks for the example!
Btw, is it possible to realize it using PLC engineering ? Cause customer will mainly work with PLC.
Thx.
06-29-2022 07:54 AM
Hi,
not as far as I know, guess you would need to wait for our build in function.
Regards
06-29-2022 09:19 AM
Hello TheCodeCaptain,
Do you have the palette of SMB node that I can install with? This is not a default node.
Thx.
06-29-2022 09:35 AM
Hello jh123,
you are right, this is a third party node and not distributed by us, we can also not support it.
You can download it in the palette manager, your engeneering pc and your ctrlX need internet access for that.
01-10-2024 08:01 PM
This works great, thank you for the information.