LINX

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication to Digital Dial Gauge

Solved!
Go to solution

Hello!

 

I hope you can help me finding a solution to my problem, accessing a digital dial gauge using Labview.

 

Following the instructions here  I was able to build the adapter and to get the measured values via the arduino sketch.

 

Now I want to access these data via LabView/Linx, to combine it with other data within Labview.

 

Unfortunately I am not experienced enough to "translate" the arduino sketch into a Linx/Labview code.

 

Could you please give me some hints how to solve this problem?

 

If I unterstand the program correctly two digital read and one digital write pin should be placed for establishing the communication.

Can I read the data sent by the digital dial gauge using the UART communication? Or is it necessary to recreate the whole sketch in Labview?

 

Thank you in advance!

 

 

0 Kudos
Message 1 of 6
(223 Views)
Solution
Accepted by topic author th.st.

Hi th.st.

 I assume that you are getting your readings to the PC using the Arduino IDE serial monitor. If that is true you really don't need LINX and probably don't need to change your sketch. Basically you will copy the setup from the serial monitor to LabVIEW (Baud rate, stop bits etc.) and read it directly into LabVIEW. Watch this excellent video presentation for details on how to properly do this. Just remember to shut off the serial monitor when reading the data from LabVIEW.  

Hope this helps

Now Using LabVIEW 2019SP1 and TestStand 2019
Message 2 of 6
(191 Views)

Hi GovBob,

 

thank you very much! That works perfectly fine!

 

 

0 Kudos
Message 3 of 6
(184 Views)

Hello GovBob,

 

perhaps you can help me with a problem I encountered while reading out the serial data from the Arduino serial monitor.

Sometimes the dial gauge seems to "produce" empty or falsely formatted value strings.

In this case just an empty string is shown.

If I now for example want to plot distance vs. force data the graph will jump back to zero periodically.

 

How can I remove this empty strings / zeros from my recorded data?

 

I already tried to change the data to a array and then search and replace the empty string / number, but none of my tries worked.

 

Could you again give me a hint?

 

Thank you in advance!

0 Kudos
Message 4 of 6
(116 Views)

th.st.

 I'm not sure how much help I can provide as I don't have the hardware, the VI you are using nor any data if I did have the VI. In fact I actually don't have the Arduino IDE available to me presently.(i'm at work).

The first thing I would do is verify that you are getting valid data from the Arduino/Device. If I remember correctly the Arduino IDE has a Serial Plotter that you could use instead of the VI to see if you are seeing these data drop-outs which would help determine where the problem is coming from. In LabVIEW under Functions>>Comparison there is empty string/path? and white space? functions that might help you remove the offending data. Under functions>string there is also a trim whitespace which also might help. If you want to view your raw data coming in from the arduino in a string indicator make sure the set that indicator to '/' codes display by right clicking it on the front panel. This will show you spaces etc.

Hope this helps

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 5 of 6
(109 Views)

Hello GovBob,

 

tanks for the fast reply.

I can provide the main VI to you, if this is helpful?

Nevertheless, the data dropouts are already present / visible in the Arduino serial plotter.

I found the empty string and white space? functions; the indicators also will change to true if the dropouts are present.

Unfortunately I don't understand how to use the functions together with a case structure (??) to remove the dropouts.

Spaces are available within the shown data but they actually do not affect the dropouts.

0 Kudos
Message 6 of 6
(105 Views)