LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Split Information from VISA

Solved!
Go to solution

Hello everyone, im here because im doing my tesis, at this moment, im having problems, receiving from a densimeter through VISA, the problem is that we need to split the information  because it comes to us in this way:

 

 

 

Densimeter---> Visa---> Labview---->T=  30.42 <C> C=  84.49 <%>

 

We tried separating the signal but without success. here i attach a copy of our VI

 

 So, the main objetive it´s  to separate the Temperature from de Concentration and then, put a graphic of each one.

 

We would be very grateful if you know something about it, cause in this point of the tesis, we are traying to develop the dinamic control of a distilation tower, so it´s really important to have that information (T, C) separated.

 

 

hope you can help us.

 

Felipe Kim V.

Nicolas Paniagua G.

 

 

T=  30.42 <C> C=  84.49 <%>
0 Kudos
Message 1 of 15
(3,624 Views)

One problem is the way you are using the queues.  Once an element is removed from a queue is it gone. You are writing (Enqueue) to each queue in only one place but are Dequeuing from each queue in two places: the display loops and the file loop.  The easy fix to that is to put the display indicator terminals in the file loop.  Then you only need to dequeue once from each queue.

 

It is usually better to initialize the serial port outside the loop and to close the VISA session outside the loop.  Similarly, open and close the file outside the loop.  Do the reads and writes inside the loop.

 

Watch your timing.  You have a Wait Until Next ms Multiple set to 5000 ms inside the file loop. I cannot tell how fast the DAQ loops are running, but if they are enqueuing data much faster than once every 5 seconds, most of the data is going to the display loops and very little to the file.

 

Lynn

0 Kudos
Message 2 of 15
(3,603 Views)

thanks lynn, but... what about our problem... i mean, how do we split the information from the visa?

0 Kudos
Message 3 of 15
(3,601 Views)

What is the exact string you receive from the serial port?

 

Lynn

0 Kudos
Message 4 of 15
(3,597 Views)

Here we pointed out in red the string, so... that´s the main problem at this point Lynn, if you have any suggestion.

 

We were trying to do something with the signal, take a look to this VI....

 

 

 

0 Kudos
Message 5 of 15
(3,592 Views)

A small communication issue. I understood where the string came from.  What I would like is the contents of the string.  Run your VI.  When one of the strings is shown on the Grado Alcoholico indicator, use the Edit menu to Make Current Value Default, and then save the VI. Post that.  Then I can work with your actual data.

 

Lynn

0 Kudos
Message 6 of 15
(3,589 Views)

Lynn.

 

We tried, but we could not, check this out.

 

look our VI, it seems that it´s working at this point, but, we have a doubt, is it correct? i mean, the way we did it separating the signal, because if you see the VI, it works, but... maybe it´s no the way, hope you have a nice day, and thanks a lot from Chile, we´ll keep in contact.

 

Muchas Gracias Lynn

0 Kudos
Message 7 of 15
(3,586 Views)

You cannot change the default while the VI is running.  The value should still be in the string after you stop the VI.

 

Lynn

0 Kudos
Message 8 of 15
(3,579 Views)

Dear Lynn:

 

We succed spliting the signal as you can see in the VI, but we are having 2 problems here...:

 

1)Lossing decimals.

 

The information, for example, Concentration has a centesimal precision, i mean:

 

C = 79.56

 

but when we split the signal an then we use a graphic, or a number indicator, labview lose those centesimals

 

this is what happen:

 

Dencimeter ( T= 90,34°C <C>  C= 70,45)---> labview-->Split signal ------->Indicator or Graphic for T:  90

                                                                                                -------> Indicator or Graphic for C: 70

 

SO that´s a BIG PROBLEM, because we need to develop a PID contol system using the CONCENTRATION, so... if we can´t receibe all the information (centesimals)  the control it would be terrible.

 

2) Recording issue

 

 

We need to record the experimental information in a excel database, for PID development purpose, so here the CONCENTRATION has been recorder but appears with a "/", so...  when the PID controler receibe the value with that "/" it would´not be able to work.

 

Here i attached the VI and two screenshots

 

So those are our big problems hope Lynn or someone could help us in this issue

 

Have a nice weekend guys

 

 

0 Kudos
Message 9 of 15
(3,528 Views)
Solution
Accepted by topic author NikoP

You need to use Fractional Number from String an not Decimal Number from String if you have digits after the decimal point.  (I know it is confusing and is a common mistake.  Decimal in this case means decimal as opposed to binary, hexadecimal, or octal.  It doesn't mean decimal as in decimal point and digits after that.)

 

I don't quite understand your use of For Loops with Auto indexing that run just one time.  It seems like there should be a better scheme for breaking up your characters.

0 Kudos
Message 10 of 15
(3,524 Views)