Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple sensors connect to PIC Microcontroller

if your divace couldsend data without any thing to wirte into it so your visa method is correct
for what you want you can use this method visa.jpg

0 Kudos
Message 21 of 28
(2,772 Views)

In this way how can i represent five data to five temperature meter???

 

0 Kudos
Message 22 of 28
(2,765 Views)

zakariaislam17@yahoo.com wrote:

Note:PIC controller only sending data serially and each data separated by "LF(Line Feed) "it is  not get any Acknowledgement form PC.


If you have the capability of changing the code in the PIC, then you want the values seperatred by a comma and then have a Line Feed at the end of your message.  So your message should look something like "1,2,3,4,5LF" (where the LF is a line feed).  Then you have the LF be the termination character.  So you just tell the VISA Read to read more bytes than will be in a message (something like 50 should work) and then use Spreadsheet String To Array with the delimiter set to a comma.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 23 of 28
(2,756 Views)

Thanks crossrulz

0 Kudos
Message 24 of 28
(2,717 Views)

zakariaislam17@yahoo.com wrote: 

What exactly do you mean here?  As long as you are dealing with the same data type (in this case, likely DBL), then you can have whatever sensor data you want in the array.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 25 of 28
(2,706 Views)

So fare i worked with only one type of sensor now i want to work with different type sensor .Before i had only one tpye of five sensor .Now i have five different type sensor .I am receiving five data, each of them is seperated by comma and end by "LF" (e.g "45,60,75,40,78LF),Is it possible to put them in five meter.

0 Kudos
Message 26 of 28
(2,703 Views)
hi again it seem your problem is not fix yet
could you tell us what is your different data is ?
you have to convert them to related data type to use in meter
0 Kudos
Message 27 of 28
(2,701 Views)

zakariaislam17@yahoo.com wrote:

So fare i worked with only one type of sensor now i want to work with different type sensor .Before i had only one tpye of five sensor .Now i have five different type sensor .I am receiving five data, each of them is seperated by comma and end by "LF" (e.g "45,60,75,40,78LF),Is it possible to put them in five meter.


The short answer is yes.

 

Slightly longer answer: You can put whatever you want into that array.  It is just a matter of how you encode the data on the PIC side and making sure you interpret it the same way on the LabVIEW side.  Just making things up here.  Let's say you have 3 thermocouplers, a barometer, and an anemometer.  So on the pic side, you have all of those sensor data seperated by commas (one number for each sensor).  On the LabVIEW side, you make the array of numbers and then just use Index Array and/or Array Subset to get the specific value(s) you want for each calculation/graph/indicator/log.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 28 of 28
(2,700 Views)