Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to differentiate between data (of different sensors and actuators) data is tans/recvd using serial com

Solved!
Go to solution

Hi

I am receiving  2 different types of data from controller.How to differentiate B/W them.

upon receiving  my code making deccissions.There are 6 different control elements in my project connected to controller.Pls give me idea how i send data to controller so that controller differentiate which output to be active or low

0 Kudos
Message 1 of 6
(3,343 Views)

The receiver can only differentiate the the data if the sources send some kind of identifying signal with the data.

 

You terminology is not clear. Please give specific examples of the different types of data and the various control elements.

 

Do you have any control over what is sent or when it is sent?

 

You refer to "serial com." Is that RS-232 or some other serial protocol? Do you have a built in serial port or is this using an adapter between USB and RS-232?

 

Lynn

0 Kudos
Message 2 of 6
(3,339 Views)
You have not provided nearly enough information. Since every instrument is different, you will need to start by studying it's manual.

If you need help, provide the make and model, the manual, and whatever code you have written.
0 Kudos
Message 3 of 6
(3,335 Views)

first of all Sorry

Communication RS232(serial) since my laptop has no buld in serial port so i am using USB to serial  converter .Controller AVR(atega 16)

Receiving Thermocouple temp data+level of water in tank

and on the basis of this data i have to control

3 solenoid valves

1 pump

2 electric rods

0 Kudos
Message 4 of 6
(3,321 Views)

dennis

i am very well familiar with my controller but not with labview

i have developed a technique that

if data<10     data is of water level

iF data>10       data=thermocouple temp data        from controller temp=temp+10

 

i want a similar techniq or a new one to send data  from labview to controller to control my

3 valves

2 rods

1 pump

0 Kudos
Message 5 of 6
(3,320 Views)
Solution
Accepted by topic author chota

First, look at the couple of serial examples that come with LabVIEW. You use VISA functions to read and write. Your technique for separating the values will work in LabVIEW as well. You would convert the string that is returned by the VISA Read to a numeric (i.e. with Scan From String). Then do the comparison, then wire the result to either of two indicators. Putting the terminal of each indicator inside a case statement would be one way to do it.

0 Kudos
Message 6 of 6
(3,316 Views)