4.37 - WriteMem [U12 Datasheet]
Writes 4 bytes to the LabJack’s 8,192 byte nonvolatile memory at a specified address. The data is read back and verified after the write. Memory 0-511 is reserved for configuration and calibration data. Memory from 512-1023 is unused by the LabJack and available for the user (this corresponds to starting addresses from 512-1020). Memory 1024-8191 is used as a data buffer in hardware timed AI modes (burst and stream).
Execution time for this function is 20 milliseconds or less (typically 16 milliseconds in Windows).
Declaration:
long WriteMem ( long *idnum,
long unlocked,
long address,
long data3,
long data2,
long data1,
long data0 )
Parameter Description:
Returns: LabJack errorcodes or 0 for no error.
Inputs:
- *idnum – Local ID, serial number, or -1 for first found.
- unlocked – If >0, addresses 0-511 are unlocked for writing.
- address – Starting address for writing (0-8188).
- data3 – Byte for address.
- data2 – Byte for address+1.
- data1 – Byte for address+2.
- data0 – Byte for address+3.
Outputs:
- *idnum – Returns the local ID or –1 if no LabJack is found.