Professional Documents
Culture Documents
CEV.vi
C:\Users\Eduardo\Dropbox\Tesis\control electronico de velocidad\INTERFAZ LABVIEW\ENERO\CEV.vi
Last modified on 18/02/2016 at 12:17 p. m.
Printed on 18/02/2016 at 12:50 p. m.
Connector Pane
CEV.vi
Flow Control
Stop Bits
Puerto
Baud rate
N° de bits
Paridad
The Basic Serial Read and Write example performs a Serial Port Read, a Serial Port Write, or a combination of these
actions. The user selects the actions (read or write) on the front panel. If both are selected, the VI will write the data
first, read data, and then close the VISA session that is opened to the port. This VI will wait until the specified numb
of bytes is received at the port or until a termination character is read.
INSTRUCTIONS:
1) Select the serial resource and configuration parameters (baud rate, data bits, parity, stop bits, flow control).
2) Select the operations to be performed.
3) Connect the serial port to your device. If no device is available, perform a loopback test by doing one of the
following. Short pins 2 and 3 on a RS-232 cable or short pin 4 to pin 8 and pin 5 to pin 9 on a RS-485/422 cable.
4) Run the VI to see the data read. (The "read string" will match the "string to write" if a loopback test was performe
Note: The parameters set for the serial port must match the parameters of the connected instrument or device. In th
example, the bytes to read parameter specifies the number of bytes that the serial port reads. If there were more by
at the port than the number specified in bytes to read, those bytes would not be read. Also, if you specify to read m
bytes than the number of bytes actually read, you might receive a timeout error message.
On the block diagram, the Configure Serial Port VI sets the configuration parameters. The front panel displays the
controls used to configure the basic parameters, such as baud rate, data bits, and parity. Constants configure the oth
parameters the user probably does not need set. After the VISA Configure Serial Port VI opens the VISA session and
configures the port, the VI passes the VISA resource name to other VIs that perform operations on that VISA resourc
The VISA Write function sends a command to the serial device and the VISA Read function returns data based on th
command. The VISA Close function then closes the reference to the serial device. It is important to close the
reference; otherwise communication through with that port through protocols other than VISA might not be
possible.
Page 2
CEV.vi
C:\Users\Eduardo\Dropbox\Tesis\control electronico de velocidad\INTERFAZ LABVIEW\ENERO\CEV.vi
Last modified on 18/02/2016 at 12:17 p. m.
Printed on 18/02/2016 at 12:50 p. m.
Front Panel
timeout (10sec)
10000 Configure Serial port (baud rate, data bits,
Puerto parity, stop bits and flow control).
Baud rate
True
UP
N° de bits 8
BACK
Uso de teclado249
Paridad
UP BACK False
2000000 LEFT
RIGHT Dato Transmitido
Stop Bits Disabled Disabled
1 Disabled datosent
Motor 2
100
0.285 30
Motor 2
OK Button
Boolean
"RIGHT"
0
Uso de teclado 249
UP
DOWN
datosent
RIGHT
LEFT
Dato Transmitido
Motor 1 Motor2 True
Boolean
246
2 Disabled
"UP"
247
"DOWN"
248
Page 4
CEV.vi
C:\Users\Eduardo\Dropbox\Tesis\control electronico de velocidad\INTERFAZ LABVIEW\ENERO\CEV.vi
Last modified on 18/02/2016 at 12:17 p. m.
Printed on 18/02/2016 at 12:50 p. m.
400
0 True
False
0
ValorB
Instr
Bytes at Port
0 False
ValorU
255
0 False
0
1
2
3 1
1 4 Motor1
5 Motor 1
6
7
8
9
False
0
251 motor 2 d
Motor 2 1 M
0 False
Corriente Motor 1
8
0 False
Corriente Motor 2
0 True
True
0 Valor Bus
Motor 2
Page 5
CEV.vi
C:\Users\Eduardo\Dropbox\Tesis\control electronico de velocidad\INTERFAZ LABVIEW\ENERO\CEV.vi
Last modified on 18/02/2016 at 12:17 p. m.
Printed on 18/02/2016 at 12:50 p. m.
True
ValorB
27
250
ValorB
Baterías
9
0
ValorU
motor1 datos
ValorU
27
250
Banco de UC
Motor1
10
datos
Write To Write To
Write To
Motor2 Measurement Measurement
Measurement
Motor2 File3 File4
File
motor1 datos Signals motor 2 datos Signals
Signals
Valor Bus
Valor Bus
27
250
ETAPA DE REGENERACION
0, 0,
0, Def 0, Def
Motor2
1
1
Motor2
Page 6
CEV.vi
C:\Users\Eduardo\Dropbox\Tesis\control electronico de velocidad\INTERFAZ LABVIEW\ENERO\CEV.vi
Last modified on 18/02/2016 at 12:17 p. m.
Printed on 18/02/2016 at 12:50 p. m.
motor1 datos
Velocidad Medida
motor 2 datos de Plataforma (m/s)
2000
30
Radio (cm)
10
285
ent
Page 7
CEV.vi
C:\Users\Eduardo\Dropbox\Tesis\control electronico de velocidad\INTERFAZ LABVIEW\ENERO\CEV.vi
Last modified on 18/02/2016 at 12:17 p. m.
Printed on 18/02/2016 at 12:50 p. m.
Error
Disabled Disabled
False
1 RIGHT
Disabled
0
0
2
Uso de teclado
UP 248
255
Disabled LEFT
1 Disabled
RIGHT
Disabled
4
Uso de teclado
250
UP
Disabled BACK
Disabled
1 RIGHT
Disabled
Page 9
CEV.vi
C:\Users\Eduardo\Dropbox\Tesis\control electronico de velocidad\INTERFAZ LABVIEW\ENERO\CEV.vi
Last modified on 18/02/2016 at 12:17 p. m.
Printed on 18/02/2016 at 12:50 p. m.
False