Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 70970

VI architecture for reading multiple serial stream

$
0
0

Hello all,

 

I'm in need of a bit of advice. Let me first say that I'm not LabView expert, but sadly no one in my work enviroment uses LabView, so I have to solve this on my own. I know the basics of LabView, but with my current problem, I just lack the experience..

 

So what I'm trying to do, is simply read in three displacement sensors, that's it. I'd like to do this at roughly 100 Hz. The sensors can be adjusted via a program in terms of mainly Baud rate, but also some other settings. Furthermore, all communication protocols are already made into a dll library. There are some LabView example included with the software. One for just communicating, and two other for receiving data. The other two work in two different modes; One loops a request command at a certain frequency and request a single data point every time it loops. The other just sets the sensor at streaming mode and reads out that. I've added both examples below. The communication is already done via the dll, so I don't have to send the sensor command manually.

 

Now, at first I basically copied the 'request' version two more times, within the same loop and rewired the data writing part a bit. It works, but it goes way too slow (~15Hz) and changing the Baud rate doesn't help. Then I tried the streaming example since I seems logical to me that constantly requesting a data point is slower than just letting the sensor stream. So I adjusted the second example and tried firstly fit the same thing two more times in the same loop and later gave them their own loop (didn't try to extract the data into a file yet). In both cases it works, at sufficient speed, but weirdly the data lags behind the actual input (at the sensor end) several seconds. I'm really confused by this and I can't explain it.

 

I was wondering if any of you could take a quick glance and spot something wrong or maybe tell me what I'm doing wrong, because I can't really think why this doesn't work, but as I said, I'm no expert with LabView.

 

Thanks!

 

 


Viewing all articles
Browse latest Browse all 70970

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>