Sends bytes to a specified VXI Message Based device.
[ lStatus = ] VxiSend ( lLA, sEOS, bEND [, enMode] , pSrc [, lBytes ] )
The VxiSend procedure syntax has the following parts:
Name |
Type |
Description |
lStatus |
Long |
Bytes actually sent |
lLA |
Val Long |
Device logical address |
sEOS |
Val BString |
End of sequence string |
bEND |
Bool |
A Boolean expression specifying whether or not to terminate the transmission upon the End bit. |
lTimeout |
Val Long |
Timeout in milliseconds |
enMode |
Val enumAIoMode |
Output send mode. Only the default value is 0 (aioDefault) which can be combined with aioDisableBstrConvert. |
pSrc |
Val Any |
Send data buffer |
lBytes |
Val Long |
Maximum number of data bytes to send. When the default value (-1) is used the size of the send buffer pSrc is used. |
bEND can have one of the following values:
Value |
Description |
True * |
Terminate the transmission upon the END bit. |
False |
The END bit is ignored (similar to GPIB EOI). |
enumAIoMode can have one of the following values:
Name |
Value |
Description |
aioImmediate |
0 * |
Receive on data available |
aioWaitGpibSrqVxiDor |
1 |
Receive on Srq (gpib) or on Dor (vxi) |
aioGpibImmediateOrSrq |
2 |
Receive on Immediate or Srq (gpib) |
aioDisableBstrConvert |
4 |
Disable conversion of BString to String, can be combined with one of the previous values. |
The lLA contains the logical address of the device and may be obtained using the GetDriverAddress function.
The sEOS can be 0-2 bytes long. It specifies the data bytes that signal the end of data (terminator).
If lBytes is not given (-1), then it is set to the length of the data buffer.
This function returns the number of bytes sent. A value of -1 indicates failure.
The following command sends the data from the data buffer at sData to a device at Logical Address 19. The terminator used is Line Feed, EOI is enabled, timeout is set to 150 mSec, and the file mode is set to FileWriteAccess:
VxiSend(19, "\n", True, 150, aFileModeWrite, sData, 20)