Objectives
This example shows how to use the READ_U_PCMCIA and WRITE_U_PCMCIA function blocks by:
Writing values from words (%MW100 to %MW109) to a memory card.
Reading values from the memory card to words (%MW110 and %MW119).
Configuration of the CPU
In this example, the TSX MRP C007M SRAM memory card is connected into the upper slot A of the CPU (parameter SLOT = 0 for the functions blocks). In addition, for data storage purposes, the CPU is configured with 2000 kB of memory.

The READ_U_PCMCIA and WRITE_U_PCMCIA functions are working with word addresses:

Addresses from 0 to 1024000 for the memory card can be used.
Programming the MAST section
In the MAST section of the program, program as follows:
The memory card is connected into slot 0.
The WRITE_U_PCMCIA function writes 10 words to address 10000 on the memory card from %MW100.
The READ_U_PCMCIA reads 10 words from address 10000 on the memory card to %MW110.
Representation of WRITE_U_PCMCIA and READ_U_PCMCIA in FBD language:


Representation of WRITE_U_PCMCIA and READ_U_PCMCIA in ST language:
WRITE_U_PCMCIA (0,10000,10,100,Status_write);
READ_U_PCMCIA (0,10000,10,110,Status_read);
Testing the Example
By using animation tables with words: %MW100 to %MW119, the values from %MW100 to %MW109 are copied to %MW110 to %MW119 via the memory card.

