Industry Automation and Control Forum
This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-04-05 04:16 PM
Apparently the file system functionality on the M241, M251, M262 is "constrained" ... to be polite
My search for means to access the SD card for datalogging purposes turned up this link:
https://www.se.com/in/en/faqs/FA372415/
While this program is a precursor to the CSV File Writing/Reading Example project available with ME
I didn't detect any means of writing to / reading from SDcard.
I noticed mention of using the mass storage "feature?" of ME and in some of the documentation it refers to
accessing the SD card via /sd0 - appropriate since that is the standard linux folder name for SDcard
However this Mass Storage feature appears to be purely manual - at least I see no means to integrate it into
the running PLC environment. (As an aside, the behaviour of that tool, in terms of upload is just silly. It pays
no heed at all to the specified source folder and just randomly grabs a few of the system folders)
When I attempted to prepend /sd0/ to the file path in the CSV_ReadWrite example programs, they failed
even though prepending /test did result in the file being written in the /test folder as expected.
It appears that sd0 is indeed recognized as a special folder - rather than just an ordinary folder - but the
implementation to actually access the device is broken.
While some kind of hack is implemented in the DATALOGGER function which enables the files to be written either to
internal system memory or to SDcard, this hack appears to be a non-standard special-case anomaly...
Unfortunately, the DATALOGGER functionality is somewhat gimped up... the file name is static and cannot
be dynamically created - like as yyyymmdd.csv. It is not clear whether it would be possible to use any
functions/utilities to copy the contents of the datalogger file - either because that file would still be open - or
because the functions lack the flexibility to perform such operations
Also the datalogger format, reminiscent of visual BASIC or some other early DOS code wants to be "helpful"
by stuffing in a CSV-mangling continuously updated first line indicating how many lines have been written to the file...
so... does anyone have any insights into wrangling / smartening up / working around this 1980's era stuff ?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-04-19 04:32 PM
You mention adding some library but did not specify the name of the library
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.