From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I read continous streams of data?

Well, you used the code I sent, but failed to read the detailed comments that I spent some time trying to explain clearly my recommendations and where the problem might be.  So I'll say it again.  If you want to again ignore my advice, which you are free to do, at least give me the courtesy of explaining why your way is better than my suggestion.

  • I recommended that you omit wiring the inputs to the VISA Configure that match the Default settings.  [If you insist on ignoring this advice, at least wire all of the inputs -- you left one out].  In your situation, only Baud rate and the VISA Resource Name need to be wired.
  • I suggested that before you test code, you run an "Explore My Device" session with MAX.  Did you do that?  I'm guessing "No".  If you tried it, please tell me what you learned.  If you ignored my suggestion, please tell me why ("I'm too lazy" is not an acceptable answer -- if I were being lazy, I wouldn't be typing all of this to you ...).
  • Do you see where I wrote about writing a Command to your device to tell it to start listening?  That's based on an assumption I made, without knowing anything about your BlueTooth receiver, that it needed to send to the Transmitter to tell it to "Start Sending".  This could be wrong -- the above Bullet Point might have clarified this (if you did it) -- if it is, the Write is not needed (and, at present, it looks like you aren't writing anything anyway, as you seem to have a blank string).
  • Do you understand what VISA means by a Timeout?  Do you understand that you configure VISA for a 10 second timeout?  Would it be correct to say that the Timeout Error happens about 10 seconds after you start your program?  Can you deduce what that means?  Can you remedy the problem?

I'm trying to be patient here, but you need to do your part.  Please respond to these points.  You may need to wait until you can "do the experiments" (or "tests", if you're an engineer).

 

Bob Schor

0 Kudos
Message 41 of 46
(618 Views)

Apologies Bob, I am very new to this software and I am learning on the go as I was not taught this software in my degree course. Do not think I am ignoring your advice, I am honestly trying the best I can to understand your comments as I am constrained with time. I will look over what you have said and get back to you but firstly, 

 

- I left all the other settings that were wired to VISA configure serial port because I initally thought you said I could hide them but I couldnt do that.

- What is MAX?

- For the time will I have to create a "wait(ms)" block in the strucuture?

0 Kudos
Message 42 of 46
(613 Views)

@Okor29 wrote:

- I left all the other settings that were wired to VISA configure serial port because I initally thought you said I could hide them but I couldnt do that.

My fault -- by "Hide", I meant "don't wire the Default into the control, leave it unwired".  I should have been clearer.

- What is MAX?

MAX is NI's Measurement and Automation Explorer, a program that is installed with NI Device Drivers and allows you to test NI hardware (including VISA).  It should be on your desktop with the name NI MAX, and have an Icon that looks (in LabVIEW 2018) like this:NI MAX.png

- For the time will I have to create a "wait(ms)" block in the strucuture?

You should not have to do that.  When you do the VISA Read and specify 1000 bytes to read, VISA will wait until one of three things occurs -- VISA reads the Termination character, or VISA reads 1000 bytes, or the VISA Timeout occurs.  You are seeing the VISA Timeout -- what does that suggest?  To put it another way, what is not happening?


Bob Schor

0 Kudos
Message 43 of 46
(606 Views)

Hi Bob, 

 

on NI Max, I tried validating my port bindings after I modified the baud rate because they did not match what was on labview, it is saying the resoure is valid but VISA cannot currently access it, what could this mean? Note: the port with this error is the bluetooth dongle?

 

A VISA timeout occurs, does it mean it is not receiving the right number of bytes?

0 Kudos
Message 44 of 46
(579 Views)

You have a Bluetooth Dongle that is getting serial data from Arduino, correct?  This is plugged into something on your PC.  You open MAX, and look in Devices.  Do you see your Bluetooth Dongle?  

 

I'm worried that you might not know what you are doing.  Here, a Picture will be helpful.  Do the following:

  1. Plug in the Dongle.
  2. Open MAX.
  3. Click Devices and Interfaces to expand it.  Also explan Software.
  4. Take a screen shot showing as much of the two lists as you can.  
  5. Reply, and attach your picture.

Bob Schor

Message 45 of 46
(576 Views)

Hi Bob, it is not showing any errors anymore. Please find attached screenshot

0 Kudos
Message 46 of 46
(559 Views)