LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial port access to a controller

hi everyone,
i am new to labview and i am from computer science department.. i didnt have any idea about labview a few days back.. but a conventional computer science programmer familiar with other programming languages..
i need to develop a project in labview to access a controller ( a TEC controller in my case) from my machine..
I have a serial port in the controller, but i dont have any adapter for that.. 
I need to develop the program in an XP system and so i just need an idea of how to go about this project.
I basically have the following questions,

1. to connect the controller to my system, do i need a rs232 cable (from the company?). 
if so, do i need a PCI card installed in the system? any specific card?
or can i have a rs232 to usb adapter and plug that into my system and still develop my project in labview?

2. to program in labview, should i need a instrument driver to send commands to the controller?
if there is something of this sort, then what should i get from the vendor who supplied the controller for me..

to be specific, the controller is a series 800 thermoelectric cooler controller from alpha omega instruments

0 Kudos
Message 1 of 8
(3,486 Views)

"do i need a PCI card installed in the system? " NO

"any specific card?" NO

"can i have a rs232 to usb adapter and plug that into my system and still develop my project in labview?" YES

 

" to program in labview, should i need a instrument driver to send commands to the controller?" NO. You can do it with VISA functions. Do a little search for those.

 

If your controller has a D-SUB 9-Pin RS-232,  you can use a simple cable, compined with USB to Serial

Message 2 of 8
(3,482 Views)

hi,

thanks for the reply..  :smileyhappy:

that was very informative..

there is a D-9 female connection in my controller device..

 

i have few questions

 

1.so i can use a USB adapter to connect this to my system? any specific USB adapter is needed or a normal rs 232 to usb would suffice?

 

2.there are a set of ieee 488.2 and scip commands given by the vendor in his manual.. is that sufficient to control the machine..

 

3.If yes, this only has the commands to read and write.. from where shoul i get to know what data corresponds to what action. For eg, if i need to raise the temperature of the TEC using the controller, how do i know writing this data will raise the temp and something else will decrease the temperature.. For this do i have to get a lookup table having commands and the hex/ascii values corresponding to the commands? if yes, what shold i ask the vendor for?

 

thanks a ton for your help 🙂

you rock!!! 

 

0 Kudos
Message 3 of 8
(3,472 Views)

1. A USB-RS232 adapter is a specific type of USB device.

 

2. Obviously, you would not use any GPIB control commands but the SCPI commands are all that you need to control the device.

 

3. There is only reading and writing. What other type of operation would you want to have? The manual should have the complete syntax for writing a command with data. For example, there might be a command listed as SET:TEMP n. n is the temperature setpoint. You would typically use a Format Into String function to create the entire command and n would be a front panel numeric control.

 

Look at the shipping examples for an instrument driver (i.e. 34401). You might also want to consider using the Instrument I/O Assistant. With a serial connection, I would also recomend you test your commands in a program such as Hyperterminal before trying to write any code.

Message 4 of 8
(3,470 Views)

there is no list of commands given like SET or something..

but there are a list of modbus registers given

and packet syntax is given..

is that all i need to send to the serial port using normal visa write and read?

 

thank you 

0 Kudos
Message 5 of 8
(3,466 Views)
Modbus registers are not at all like SCPI (or as you said 'scip') and my response was based on that. Modbus communication is much different and not something I have any experience with. Search the board for 'Modbus' to find tools and specific help.
Message 6 of 8
(3,461 Views)

oh ok dennis,thank a lot for ur help.

btw, even if i use modibus, can i use a rs232/rs485 to usb adapter?

can i go ahead purchasing one.. 

0 Kudos
Message 7 of 8
(3,449 Views)

"even if i use modibus, can i use a rs232/rs485 to usb adapter?"    Yes.

But i would suggest you first try the RS-232 cable directcly.

 

There is a modbus library (free) for labview. Do a little search and you will find it.

Or you can write your own vis. It is not difficult.

0 Kudos
Message 8 of 8
(3,435 Views)