PCD3.R600 Basic module for SD flash memory card
Short form document for PCD3.R600
|Manual||26-789_03-14||Short form document for PCD3.R600|
File System and FTP Server
PCD3.R600 is an I/O module aimed to carry a Secure Digital (SD) card having a capacity of at least 256 MB (to be ordered separately) and is designed for PCD3.Mxxxx CPUs in I/O slots 0 to 3.
Saia PCD® SD File system Explorer
|Software||Saia PCD® SD File system Explorer|
The Saia PCD® SD File system Explorer can be used for reading and writing data from the SD cards PCD7.R-SD256 and PCD7.R-SD512.
Good to know
The PCD3.R600 can be plugged in an I/O slot on the PCD3.Mxxxx CPU. The module PCD3.R600 can be equipped with an SD flash memory card PCD7.R-SD256, a PCD7.R-SD512 or a PCD7.R-SD1024.
PCD2 / Rxxx
Are there known problems when accessing the PCD FTP server with FileZilla? (FAQ #101586)
Since the FTP server of the PCD has been developped, SBC suggested to use the freeware FTP Client Filezilla to access the PLC Filesystem.
Lately and with newest FileZilla versions we received several reports that there are difficulties with the FTP Client FileZilla (e.g. that the IMasterSaia.jar was not completely downloaded).
There were problems while downloading several files in parallel to the PLC Filesystem. And sometimes it wasn't even possible to download the IMaster.jar file, because there was infinite repetition of downloading from side of the FTP Client Filezilla. After a restart of the PC, FileZilla worked again properly.
Unfortunatley these phenomenons were often not reproducible in Murten and appear to be random. Therefore it is very difficult to pinpoint the reason for the problems.
As these problems are only concerning few installations we do not intend to "forbid" the usage of the the FTP Client FileZilla together with the PCD FTP Server. However, in case you are faced with the above mentioned problems we suggest to use another the FTP Client. One client with which we made very good experiences during the past yars is the one coming with the shareware "Total Commander" (shareware). "Total Commander" also exists as portable version.
In some cases increasing the timeout in Filezilla to 60 seconds helps.
On FileZilla there is an option to limit the transfer speed.
Switching on this speed limitation does allow loading without problems files to the PCD.
To enable the speed limit, click on the tachometer symbol (on the bottom right corner of the FileZilla window)
On the next window do select the option "Enable speed limits" and do set the values to 100/20 KiB/s.
Why can't I use the whole memory of my flash card for my files? (FAQ #101558)
When using a memory module with a file system the available memory for the files is smaller than the specified size of the module. This FAQ explains what for the "not usable" memory is used.
When storing files on a file system from a memory module or to a file system on the PCD itself (e.g. the INTFLASH from a PCD3 Compact) the total size of all files which can be stored is smaller than the specified size of the memory.
If e.g. a memory is defined with 1 MByte, it is possible that I can only store 866 kByte to the file system on this memory module.
The reasons for this phenomenon are the following:
- Memory management
Some of the memory is used for the management of the file system itself (for that the firmware "knows" where to find the files which are stored).
Example: On a "blue" memory module such as the PCD7.R550, R551 or R561, the size for this internal ornanization data is 64 kByte.
- Memory reserved for compress task
Aditionally there is one sector of the memory reserved for the compressing task. During this task, the PCD needs to copy data from the sectors to be compressed to this reserved memory.
Example: On a "blue memory module" such as the PCD7.R550, R551 or R561, the size of this sector used for compressing the flash is 64 kByte
- Every file needs at least one "block" of memory
The files located in the memory are stored in blocks, and a block can only contain data from one file. This means that as soon as a file is generated (even if the size is just 8 bytes), the whole block can not be re-used for another file.
Example: This leads to the fact that e.g. 10 files with one character in it (which would be 10 bytes in total) will use 10 blocks (which is around 10 kByte on the INTFLASH of a PCD1.M2xxx or a "blue flash module").
The amount of "unusable" memory is depending on the number of files and the block size of the file system. In maximum the "unusable" memory is the number of files multiplied with the block size.
This rules apply to all file systems on memory modules and on the INTFLASH (if available). These are:
- PCD1.M2xxx (INTFLASH)
- PCD3.R550, PCD3.R551, PCD3.R561
- PCD7.R550, PCD7.R551, PCD7.R561
- INTFLASH of a PCD3 Compact or a PCD1.M2
- Memory management
What is the signification of the error: "Failed to copy to/from Flash..." (FAQ #101502)
In case a backup from/to the flash card (e.g. a PCD7.R500) can not be executed (due to the reasons listed below) this following message is displayed by PG5: "Failed to copy to/from Flash. Check Flash memory or card is fitted?"
It is most probably due to the fact that the flash memory doesn't contain a user programme or the contained configuration isn't compatible with the PCD.
For example the configuration might contain an IP Adress but the PCD doesn't have an Ethernet port!
- use the flash memory on the suitable PCD
- or try to download a new user programme / configuration from the PCD
-> flash card (Project Manager menu "Online" --> "Flash Memory" --> "Copy program to flash"
- or delete the content of the Flash memory using the press Run/Halt button beside the USB connector. Therefore press longer than 1 minute (until the Red/Green LED is flashing at 2 hz) at power up as described in the manual 26/789 chap. 3.19.1
Do I have to compress a SD card every time I deleted a file? (FAQ #101494)
In the manual for the file system it is recommended to compress a flash file system after a file has been deleted. This FAQ explains the differences between SD flash systems such as the PCD3.R600 equipped with PCD7.R-SDxxx and the PCD7.R55x and PCD7.R561 modules.
In the manual for the file system it is recommended to compress a flash file system after a file has been deleted. This is strongly recommended for the PCD7.R5xx modules, INTFLASH etc. because for these systems the compress is used in order to make "freed" memory available again.
The SD cards used in the PCD3.R600 or the PCD2.R6000 are equipped with an own controller which automatically makes "freed" memory available again. On the other hand, the free memory (where data has been deleted) will remain at its place. This leads to "holes" in the used memory structure which is not ideal (because of increased time used for the initialitation of the card on start up). The compress task will remove these "holes" in the memory.
A "compress" is not necessary for making memory space from deleted files available on SD cards. But the compress optimizes the memory usage and should be done from time to time.
As it is easyer to program the compress right after the deletion of a file, this is the easyer way to realize this recommendation.
Why does the PCD2.R6000 not work if a PCD2.C2000 is used on the same system? (FAQ #101414)
In case a PCD2.R6000 (with a hardware version / modification before B1) is plugged on a PCD2.M5 which is extended with a PCD2.C2000 the file system on the SD card is not accessible.
The file system of a PCD2.R6000 is not accessible or visible if the R6000 is mounted on a PCD2.M5 which is extended with a PCD2.C2000 extension module. When connecting with an FTP client, the SLxFLASH is not visible at all.
Due to a hardware restriction of the PCD2.R6000 the module does not initialize correctly if a PCD2.C2000 is plugged.
This restriction is eliminated with hardware version B and hardware modification 1 (-->"B1"). This version is delivered since week 18 of 2010.
In case you are concerned by this restriction, please send your PCD2.R6000 to the repair service of SBC (with the remark "KR-PC-10-013"). This hardware update will be executed free of charge.
Please note that the same behaviour (R6000 does not work / is not detected; its LED "Diag" remains red) in case an analogue I/O module is plugged on the slot with I/O address 240. In this case, please remove the analogue I/O module from the slot with base address 240 (on this slot no analogue I/O module can be used as it would interact with the hardware watchdog of the PCD).
Why does only one PCD2.R6000 work on my PCD2.M5xxx? (FAQ #101275)
In case more than one PCD2.R6000 produced before August 2009 are installed on a PCD2.M5xxx, the PCD does not properly initialize the file systems during start up. As result the file systems can not be used (and are not visible on the FTP server of the PCD).
The file systems of the PCD2.R6000 on slot #0 to slot #3 (SLxFLASH:/) on a PCD2.M5xxx are not be visible on a PCD2.M5xx0 with several PCD2.R6000 equipped. This phenomenon can be observed on systems equipped with SD flash cards PCD7.R-SD512 and PCD7.R-SD1024 which have a production date in the year 2009 (09xx) if the hardware version of the PCD2.R6000 is older than "B".
If only one PCD2.R6000 is equipped, no problem is to be expected. A single PCD2.R6000 can be inserted in any slot from slot #0 to slot #3.
In dependance of the hardware modification of the R6000 the PCD can not correctly initialize the file systems of the above mentioned cards at start-up if more than one R6000 is plugged. As result the file systems can not be used (and are not visible on the FTP server of the PCD).
There is no data loss in this situation.
With hardware version "B" of the PCD2.R6000 it is possible to mount several PCD2.R6000 modules on the PCD (without any restriction of the production date of the SC card).
Modules with this modification are available from stock since beginning of August 2009 (calendar week 32 of 2009).
A PCD2.W3x0 conflicts with a PCD2.F2xx0 or a PCD2.R6000 on a PCD2.M5xxx (FAQ #101262)
A hardware conflict on a PCD2.M5xxx between a PCD2.W3x0 plugged to I/O slot 3 and the modules PCD2.F2xx0 and PCD2.R6000 leads to the fact that the communication- and memory modules do not work in this constellation. If the PCD2.W3x0 is removed from the I/O slot 3 the installation is working correctly.
In case a PCD2.W3x0 analogue input module is plugged in the I/O slot 3 (base address 48) the communication modules PCD2.F2xx0 and the memory modules PCD2.R6000 do not work.
The LEDs on a communication module PCD2.F2100, a PCD2.F2210 or a PCD2.F2810 are lit 50% red and 50% green (blinking). The file system of the PCD2.R6000 (SLxFLASH:/) are not visible over e.g. FTP. Only PCD2.M5xxx with hardware version older than C345 are concerned.
The reason for this behavior is a conflict between the PCD2.W3x0 (PCD2.W300, PCD2.W310, PCD2.W340, PCD2.W350, PCD2.W360) and the PCD2.F2xx0 or R6000. This conflict exists only if the PCD2.W3x0 is plugged on the I/O slot 3 (base address 48).
- This conflict is no longer present with hardware version C345 of the PCD2.M5xxx (the according filter of the I/O bus has been adapted in order not to lead to this conflict).
- In case it is not possible to replace the system immediately (or send it to the repair service for having this modification done), the problem can be solved by not using a PCD2.W30x in the I/O slot 3. If the communication module or the memory module is plugged into I/O slot 3 the installation will work correctly.
How to copy the content of one SD flash memory card to another? (FAQ #101251)
There are several possibilities to access the content of an SD card (used with a PCD3.R600 or a PCD2.R6000).
How can I access the content of a SD card?
- Over the Automation server of the PCD3 it is possible
- Web Server of the PCD(--> read only, and the file must be placed in the folder "WEBPAGES")
- FTP Server of the PCD (read/write)
- by sending the file by EMail (SMTP)
- With a card reader on a PC. For doing so the "SBC SD File System Explorer" is to be used.
The content of a SD card is stored in the file SAIANTFS.FFS (which occupies 90% of the available disk space of the SD card). Please note that it is not allowed to "drag and drop" the file SAIANTFS.FFS on another SD card without using the "SBC SD File System Explorer"; if this is done there is no guarantee that the PCD is able to find the (copied) content of this SD card.
The "SBC SD File System Explorer" is for free and can be donwloaded from the PCD3.R600 product section on the support site (www.sbc-support.ch).
Procedure to copy the content of an SD card to another SD card
- use the SBC SD File System Explorer
- extract the files from the first SD card
- add these files on the second SD card
- Over the Automation server of the PCD3 it is possible
How many characters can be written on the file system with one write access? (FAQ #101154)
One write access executed with the new version of the FBoxes can write up to 3072 characters (the FBox executes several write commands for 255 bytes each, which is the biggest junk of data which can be written to the file system with one internal command). This new FBox library is available for PG5 1.4 and for PG5 2.0 (2.0.210)
With the help of the FBox "Log to file" or "Log to file advanced" it's possible to store data to the filesystem of the PCD.
These FBoxes permit the user that information is written according to his needs (formatting) into the file.
Older FBoxes have the limitation that only 255 characters could be written at once in to the file.
With newer FBoxes we have increased the limit of the "Head" value and the "Val" value of the FBox "Log to File Advanced" from 255 characters to 3072 characters.
Minimum requirement for the file system library to support the writing of 3072 characters:
- For PG5 1.4: $2.5.309
- For PG5 2.0: 2.6.200 (delivered with PG5 2.0.210)
- Minimal firmware version to use this new library is 1.10.16.
- The length of 3072 bytes concerns the effectively written data; in case template texts using e.g. $Rnnnn are used, the amount of written bytes count.
- When working with the System Funtions (CSF), the maximum amount is 255 characters.
The text "Register 0 contains: $R0000" is written to a file:
- if register 0 has value 1234: 25 characters (bytes) are written
(Written content: "Register 0 contains: 1234")
- if register 0 has value 1234567890: 31 characters are written.
(Written content: "Register 0 contains: 1234567890")
The correct syntax for files and directories is necessary on the filesystem (FAQ #101153)
If the file- or directory- names are not correct, this will lead to errors.
A directorie name needs always a slash in front of the name in the text definition:
For file names the slash is not allowed:
Note that the maximal length of filenames (including the extension etc.) is 23 characters.
The maximal filename length on the filesystem is 64 characters.
Be careful when implementing time and date to the filename with the syntax $D and $H. $D per example will use 9 characters. If the file has an extension as well, per example .csv, already 13 characters are used, means the filename itself cannot be longer than 10 characters.
Special characters like ä, ö, ü are not allowed on the filesystem.
Please note that "special characters" such as "ü", "¢", "ç" are not supported on the PCD file system. Additionally, the maximal file name lenght is 23 characters.
File- or directory- names with spaces are not allowed on the filesystem (FAQ #101152)
If a file- or directory- name is defined with a fixed length, it can lead to problems
The FBox indicates an error and the file or directory is not created on the filesystem
The file- or directory- name has to be defined with a default text size. If the text is defined as fixed and there are less characters than defined it is filled up with spaces. Since spaces are not allowed on the filesystem, this will lead to an error.