Function Description

The WRITE_U_PCMCIA function transfers data from the PLC RAM memory to the user memory card archiving zone. The function WRITE_U_PCMCIA allows addessing the PLC zone’s beginning to be copied to the PCMCIA card up to 65 535 (instead of 32 767 for WRITE_PCMCIA function) and is therefore recommended to be used instead of WRITE_PCMCIA function.

The additional parameters EN and ENO can be configured.

An example using the function WRITE_U_PCMCIA is available, WRITE_U_PCMCIA and READ_U_PCMCIA Example.

Representation in FBD

Representation:

Representation in LD

Representation:

Representation in IL

Representation:

LD Slot_Number
WRITE_U_PCMCIA Dest_Address, Words_Number, Source_Address, Write_State

Representation in ST

Representation:

WRITE_U_PCMCIA(Slot_Number, Dest_Address, Words_Number, Source_Address, Write_State);

Description of the parameters

This table describes the input parameters:

Parameter

Type

Comment

Slot_Number

INT

PCMCIA card slot:

  • 0 = upper slot

  • 1 = lower slot

Dest_Address

DINT

First address where the data is written in the memory card.

Words_Number

INT

Number of words to write.

Source_Address

UINT

First address where the data is read from the PLC (%MW). The upper limit of the address is: 65 535.

This table describes the output parameters:

Parameter

Type

Comment

Write_State

INT

Code providing the result of the write command execution:

  • 16#0000: write performed correctly

  • 16#0102: Source_Address + Words_Number - 1 is greater than the maximum number of declared words in the PLC

  • 16#0104: no valid application or no word in the PLC

  • 16#0201: no file zone in the memory card

  • 16#0202: memory card error

  • 16#0204: memory card write-protected

  • 16#0241: Dest_Address < 0

  • 16#0242: Dest_Address + Words_Number-1 is greater than the highest address of the memory card

  • 16#0401: Words_Number ≤ 0

  • 16#0402: Slot_Number is different from 0 and 1

  • 16#0501: unsupported service