
|
The CSV file and the binary file can be created by using the ATA card in PLC. Hereafter, it is possible though the file control was a function that PC is skillful up to now also by PLC.
|

Commentor / R.Takeuchi |
| |
The CSV file is created in PLC and the data collection |
Though some high performance instructions are added to CPU of MELSEC-Q series, I introduce about the function of the file operation.
Until now, at constant intervals, it tried to have collected the data of PLC, if we construct the system that the form that was able to be read by the Excel such as CSV (Comma Separated Value format) files, though there was only writing the program on PC side, it came to be able to achieve it by the function of PLC in MELSEC-Q series.
Though the memory card that can be used by Q series, three kinds of SRAM, the flash and the ATA card are prepared, if the file is edited with the ladder, the ATA card is needed. It is necessary to be careful of it, because the SRAM card and the FLASH card cannot generate with the file.
For example, though the "FWRITE" is added to ladder application instructions, by using this, "100 points' of data is written from D0 to the CSV file of 10 rows a line" can be done.
 |
A left chart is an example of using the FWRITE instruction.
D900 : Binary Format(H0) / CSV Format(H100)
D904-905 : Write Position(0=Top of File)
D906 : Number of rows (9 rows)
D907 : Word(0) / Byte(1)
D910-914 : File Name ("000000.CSV")
D920 : Write Points
D921- : Write Value
|
 |
Because the file edit by the ladder instruction is made on the memory card, it is possible to download it on PC by using ladder development tool GX Developer.
|
 |
Moreover, even if the ladder development tool is not used, it is also possible to download it from PC etc. by the FTP. Please see here about how to use of FTP.
|
 |
If the downloaded CSV file is opened with the text editor such as notepad, it displays like this.
|
If this function is used, the data is accumulated with PLC, and it is possible to save into PC in batch. Until now, in the system that has communicated in real time with PC System at high speed on, PLC side setup high speed Buffering and like batch send according to spontaneous timing, the function can apply by various scenes.
However, we worry about a thing. In the binary form is possible to add in spontaneous position at the data, but it cannot insert the record in the tail of the file of CSV. We worry about a thing that needs to generate the file, when the "Buffering" can be done the file register etc, when all the file images make complete.
Until now, if PC is not used, the function that was not able to be achieved, with using in MELSEC-Q series, we can support. Please take it into consideration about MELSEC-Q series.
|
|