Jump to content

Using multiple .CSV's at the same time


Recommended Posts

Is it possible to use multiple .CSV's at the same time.

 

I have a situation where I am using my data tables to log vital information about its run conditions. From there, the customer goes to the site, puts in a micro SD card and performs a manual "dump" of the data tables to a named .CSV file.

 

Another customer requested that more data be recorded. This led me to look at data loggers, look at changing the data tables I have set up, etc.   After some thought, I wondered, can the PLC be used a data logger using different .CSV files recording separate information as long as I keep track of the MI's used for lines and make sure that I write the right stuff to the correct CSV. file name?

 

The final solution is that the unit still records vital information to the PLC data tables as I already have the code written to do, and only when a SD card is present does the unit data log information into a separate .CSV file,

 

Does this sound logical? Has anyone run across issues with using multiple .CSV files at the same time?

 

Thanks,

 

Dan 

Link to comment
Share on other sites

Hi Dan,

For each type of SD card operation there is a separate handler. There is one handler to write CSV files.

There is no problem to set number of requests to write CSV files, but all requests will be processed in sequence as it is in Ladder.

I will recommend to set in Ladder one general request for backup. It will set request to save first table.

When first table will be finished - it will set request to save second table. Etc., until last table backup will be finished.

Then "SD Safely Remove" request will be set by this handler or by Operator.

 

One important remark - SD card extenders of any type are NOT SUPPORTED. SD card should be inserted in PLC SD card slot.

 

I hope this helps.

Link to comment
Share on other sites

Alex,

 

That doesn't really answer my questions.

 

I understand that the PLC will execute the commands in the order they are written (rung by rung, function block by function block). Has anyone ever written to multiple .CSV files on the same SD card? I just wanted to make sure that it can be done before I write a bunch of code to do it.

 

Don't think I mentioned anything about SD card extenders...

 

Thanks,

 

Dan

Link to comment
Share on other sites

Hi Dan,

 

PLC do processing of all SD read/write requests sequentially. There is an internal schedule between different handlers (CSV, Data Table, etc.).

SB 344 show, if CSV handler is busy or not.

If it is busy - you must NOT request to write more data to CSV file, until this bit will be down.

This leads to fact, that you do not need to write simultaneously to many CSV files (and you cannot, as SD card blocks are stored 1 by 1).

Attempt to write multiple files at the same time will lead to trouble in realization and support.

*Why do you store Data Table in CSV? Why not as Data Table? It will require less SD card space and will be finished fastest.

 

I hope I answered your question(s).

BR.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...