omron — Example

V+ AceServer Module Documentation handle Index of the message to read from ptr Position in the message buffer to read at offset Offset into output array for first item. 0 is default Output Parameters Parameter Description ptr Index pointing to the next data item in the message $value[] Array filled with data read n_items Number of items read sv.read_bool(handle, ptr, value) Abstract Read a boolean from the message buffer. The message pointer is incremented after the read.

Input Parameters Parameter Description handle Index of the message to read from ptr Position in the message buffer to read at Output Parameters Parameter Description ptr Index pointing to the next data item in the message value Value of the parameter read from the message stream Example .PROGRAM ex1.msg(handle, ptr) ; ABSTRACT: Demonstrate writing then reading to a message buffer ; ; INPUTS: handle: Index of the message to write into ; ptr:

Position in the message buffer AUTO REAL saved.ptr AUTO REAL bool.val, byte.val, double.val, short.val AUTO REAL single.val AUTO $string.val AUTO LOC trans.val ; Save the original position of the pointer saved.ptr = ptr ; Write some data CALL sv.write_bool(TRUE, handle, ptr) CALL sv.write_byte(8, handle, ptr) CALL sv.write_double(100.1, handle, ptr) ACE Reference Guide, 18317-000 Rev A Page 726