B&B Electronics MODSCAN32 - Manual User Manual
Page 45

45
Status - indicates whether or not the operation was completed successfully
Notes:
Status will be MBUS_OK, (0), if the data point was successfully read, otherwise, a non-zero value 
indicates one of the defined error conditions. 
 
short WriteValue (short PointHandle, short Index, short Value)
Arguments:
Point Handle - refers to value returned from CreatePollRequest 
Index - Specifies the index into the array structure 
Value - is the data to be written. 
Return Value:
Status - indicates whether or not the operation was completed successfully
Notes:
Status will be MBUS_OK, (0), if the data point was successfully queued for transmission to the 
addresses slave. A zero return value does not indicate successful transmission of the request to the 
slave device. The controlling application is responsible for verifying the write operation by 
reading back the value written. 
 
short ModifyPollRequest (short PointHandle, short Device, long Address, short Length) 
Arguments:
Point Handle - refers to value returned from CreatePollRequest 
Device - Specifies the new slave device address 
Address - Specifies the new data point address,(in modbus master (5 digit) format. 
Length - Specifies the number of values included in the definition 
Return Value:
Status will be MBUS_OK, (0), if the data point was successfully modified, otherwise, a non-zero 
value indicates one of the defined error conditions. 
Notes:
Immediately after changing the parameters of a defined data point, the current status of each value 
in the array will be set to MBUS_UNINITIALIZED, indicating that the data does not represent 
that defined by the device/address definition. The first poll after modification should reflect the 
true status of the addressed data array. 
 
short DeletePollRequest (short PointHandle)
Arguments:
Point Handle - refers to value returned from CreatePollRequest
Return Value:
Status will be MBUS_OK, (0), if the data point was successfully modified, otherwise, a non-zero 
value indicates one of the defined error conditions. 
Notes:
This routine frees up memory allocated by ModScan to support the defined Poll Request.
