The following is for example use only. No support beyond... warranted. Code seen below is to be used “as-is” at...

The following is for example use only. No support beyond that seen below may be expected nor
warranted. Code seen below is to be used “as-is” at the user’s own risk.
10 July 2002
How to operate VXM Control with National Instruments Labview
The code seen below is for use with the serial.llb file of Labview ONLY. All instructions are
based upon the assumption that the user has general knowledge of the operation and programming with
National Instruments Labview. Any attempts to communicate with controller via the Labview VISA or
other National Instruments Software questions or comments should be directed to National Instruments
for any technical support needed.
I.)
Open the “serpOpen.vi” to view whether the port is open or closed.
II.)
Open the “Serial Port Init.vi” and set the Port Number to the port that the VXM is attached to
III.) Set the “Baud Rate” that the VXM is set to
IV.) Set “Data Bits” to “8”
V.)
Set “Stop Bits” to “1 bit”
VI.) Set “Buffer Size” to “0”
VII.) Run the vi
VIII.) Open the “Serial Port Write.vi” and set to the same port
IX.) Type “E” into the string to write
X.)
Run the vi and the VXM control should come online
XI.) Open the “Serial Port Read.vi” and set to the same port
XII.) Set the “Requested byte count” to 1
XIII.) Run the vi and user will see “E” returned from the control
XIV.) Repeat step VIII to XIII with different commands as needed
XV.) Type “Q” into the string to write box in the “Serial Port Write.vi”
XVI.) Run the vi and the VXM control should go offline
XVII.) Open the “Serial Port Read.vi” and set to the same port
XVIII.) Set the “Requested byte count” to 1
XIX.) Run the vi and the buffer should be cleared
XX.) Open the “Close Serial Driver.vi”and set to the same port
XXI.) Run the vi and the port will now be closed to be used by other programs
For a detailed view of the steps see the pages that follow.
The following is for example use only. No support beyond that seen below may be expected nor
warranted. Code seen below is to be used “as-is” at the user’s own risk.
10 July 2002
How to operate VXM Control with National Instruments Labview (Detailed Description)
I.)
Open the “serpOpen.vi” to view whether the port is open or closed.
“serpOpen.vi” found in the \vi.lib\instr\ serial.llb “serpOpen.vi” found in the \vi.lib\instr\ serial.llb
of Labview directory (Port closed view)
of Labview directory (Port open view)
The following is for example use only. No support beyond that seen below may be expected nor
warranted. Code seen below is to be used “as-is” at the user’s own risk.
10 July 2002
How to operate VXM Control with National Instruments Labview (Detailed Description continued)
II.)
Open the “Serial Port Init.vi”
A.) Select the “Port Number” that the VXM is attached to (Com1 = 0, Com2 = 1, Com3 = 2,
etc.)
B.) Select the “Baud Rate” that the VXM is set to (factory default = 9600)
C.) Set “Data Bits” to “8”
D.) Set “Stop Bits” to “1 bit”
E.) Set “Buffer Size” to “0”
F.) Leave “Flow Control etc.” as seen below
G.) Run the vi
“Serial Port Init.vi” found in the \vi.lib\instr\
serial.llb of Labview directory
Port Status View after run
The following is for example use only. No support beyond that seen below may be expected nor
warranted. Code seen below is to be used “as-is” at the user’s own risk.
10 July 2002
How to operate VXM Control with National Instruments Labview (Detailed Description continued)
III.)
Open the “Serial Port Write.vi”
a. Select the “Port Number” that the VXM is attached to (Com1 = 0, Com2 = 1, Com3 = 2,
etc.)
b. Type “E” into the string to write
c. Run the vi
d. VXM control should now be online
“Serial Port Write.vi”found in the \vi.lib\instr\ serial.llb
of Labview directory
Port Status View after run
The following is for example use only. No support beyond that seen below may be expected nor
warranted. Code seen below is to be used “as-is” at the user’s own risk.
10 July 2002
How to operate VXM Control with National Instruments Labview (Detailed Description continued)
IV.)
Open the “Serial Port Read.vi”
a. Select the “Port Number” that the VXM is attached to (Com1 = 0, Com2 = 1, Com3 = 2,
etc.)
b. Select the “Requested byte count” (value varies dependent on # chars wanted vs. # of chars
in the buffer)
c. Generally if byte count set to 1 then user will see “E” returned when the vi is run
“Serial Port Read.vi” found in the \vi.lib\instr\ serial.llb
Port Status View after run
of Labview directory
The following is for example use only. No support beyond that seen below may be expected nor
warranted. Code seen below is to be used “as-is” at the user’s own risk.
10 July 2002
How to operate VXM Control with National Instruments Labview (Detailed Description continued)
V.)
VI.)
VII.)
VIII.)
Repeat step III and IV as needed
Repeat step III with “Q” in the “string to write” box and control should go offline
Repeat step IV to clear the buffer
Open the “Close Serial Driver.vi”
a. Select the “Port Number” that the VXM is attached to (Com1 = 0, Com2 = 1, Com3 = 2,
etc.)
b. Run the vi
c. Port status should now appear as seen below
“Close Serial Driver.vi” found in the \vi.lib\instr\
Port Status View after run
serial.llb of Labview directory