LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automation Using LV

I have a following set up

1. A board is connected to the PC over a serial port.
2. Typically we invoke Hyper terminal on the PC with correct baud rate etc and type the commands on the hyper terminal console which will give results over the Console. For eg. Memory info when typed gives the details of the Memory card inserted. We have a number of commands like this and from the console output we know whether the test has passed or failed.
I want to automate this using the Lab View. So Lab View has to send these commands (But I am not sure whether this is scripts or Lab View Tool or what it is) and wait for the response over the serial port and analyze the string and decided test has passed or failed. We may have to run the same test in a loop or call other tests and make a report.

How can I achive this using Lab View?
I am very new to this Lab View, can you forward me any script or suggest some tools to do this.

Regards
0 Kudos
Message 1 of 4
(2,715 Views)
Hi Vijay

What you are looking to do is not too difficult with LabView. I would suggest that first of all you load a simple example that will allow serial comms with your board. If you go to Help on the menu bar >> Find Examples ..., then click on the Search tab and type in "serial" as a search string, several examples will be listed. "Serial Communication.vi" is a very simple vi that should allow you to talk to your board. To use settings other than 9600 baud,no parity,8 bits,1 stop bit you'll have to open the VISA Configure Serial Port.vi and set accordingly.
Otherwise you should be able to send your command as with Hyperterminal and receive a reply. Once you are happy with the comms side it is not too big a step to start automating things, typically using loops and event structures to send out sequences of commands and receive and log replies. Think about the controls and indicators you need for your GUI and use these to help drive your design.
Good luck

Neil
0 Kudos
Message 2 of 4
(2,705 Views)
Hi

To communicate with my board using hyper terminat I use the following setup:: Connection: com1,Baud rate:57600,Data Bits:8, parity:none,stop bit:none.
In the LabView <->Serial.vi example how do I set all these?
What is resource name & how do I configure it?
What are string to writ & read string?
where do i give the input?

I am very new to labview:

Can you pls explain all the details


Thanks
0 Kudos
Message 3 of 4
(2,675 Views)
Vijay,
Since your setup is different from the default you'll have to use the "configure..." VI mentioned earlier to change the serial settings. If it isn't already found in the example VI, you will have to add it to the code at the beginning.
NI products uses a system called VISA to communicate with different kinds of devices, including serial devices. This system has its own names for the hardware resources you have. In the VISA control, do you see options like "ASRL1::INSTR"? If so, these are your ports. These names can be changed - search this site for "VISA alias" for instructions on that. For now, it's sufficient to know that the option I mentioned is COM1.
"String to write" and "Read string" are the connections you use to send and get the data. Sub VIs act like functions in other languages - their inpputs are similar to arguments. I suggest you search this site and the web for LabVIEW tutorials. You can also try contacting your local NI office for one of their courses.

___________________
Try to take over the world!
0 Kudos
Message 4 of 4
(2,654 Views)