Sends a Word Serial command to the specified message-based VXI device.
[ lStatus = ] VxiCommand ( lLA, lWidth, lCmd, nCmdExt, lMode, plResult )
The VxiCommand procedure syntax has the following parts:
|
Name |
Type |
Description |
|
lStatus |
Long |
Status |
|
lLA |
Val Long |
Device logical address |
|
lWidth |
Val Long |
Specifies the width in bytes of the serial command: (2,4,6) = 16, 32, 48 bit commands |
|
lCmd |
Val Long |
Lower 32 bits of the command value |
|
nCmdExt |
Val Short |
Upper 16 bits of the command value |
|
lMode |
Val Long |
Response mode: 0 - Do not get response <> 0 - Get a response |
|
plResult |
Var Long |
Response value |
VxiCommand is used when special command sequences which are not supported by other ATEasy VXI functions need to be sent to a VXI device or devices.. Do not use this function to transmit data to devices.
The lLA contains the logical address of the device and may be obtained using the GetDriverAddress function.
The lWidth parameter is an integer that represents one of the following:
|
2 |
Word;16 bit command. |
|
4 |
Longword; 32 bit command. |
|
6 |
Extended Longword; 48 bit command. |
if lMode is not equal to 0, the function also returns the response in lResult.
If lStatus is negative, an error has occurred. Otherwise, the function is successful.
The following command sends the extended longword serial command 0xFFFCFFFDFFFE to a device at logical address 7. The response is assigned to the variable Resp.
VxiCommand(7, 6, 0xFFFDFFFE, 0xFFFC, 1, Resp)