DioWriteValidDataMemory

Applies To

GX5055, File

Purpose

Writes a block of data to the valid data memory of the specified board (Master or Slave).

Syntax

DioWriteValidDataMemory (nHandle, pvMemory, dwStart, dwSize, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Board or File board handle.
pvMemory
PVOID
Pointer to an array of double words.
Array data type is Double Word and maximum array size is 512K of double words.
dwStart
DWORD
Starting address to write.
dwSize
DWORD
Number of steps to write.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

Program counter will be set to zero and I/O pin directions are set to input (the output driver is disabled) after calling this function.

The input voltage can be inside one of the following ranges:

     Input voltage is higher than high voltage threshold, input is logic high. Data will be logged as logic high to the input memory and 0 to the invalid logic level input memory.

     Input voltage is lower than low voltage threshold, input is logic low. Data will be logged as logic low to the input memory and 0 to the invalid logic level input memory.

     Input voltage is higher than low voltage threshold and lower then high voltage threshold, input is invalid. Data will be logged as logic low to the input memory and 1 to the invalid logic level input memory.

Note: The board must be in HALT state before calling this function.

Example

The following example writes 64 steps to the Master board’s valid data  memory beginning at step 128:

 

DWORD adwData[64];

DioWriteValidDataMemory (nHandle, adwData, 128, 64, &nStatus);

 

See Also

DioWriteCtrlMemory, DioReadCtrlMemory, DioReadInMemory, DioReadOutMemory