From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Slow response in LabVIEW when polling two NXT bricks

My goal:

To build a educational fun game that uses two NXTs by bluetooth to select the correct answer and as a buzzer.

 

My problem:

I have everything working with simulating the NXTs with Boolean Push buttons on the Front Panel, but I can not seem to get the polling of the NXTs to be very responsive. I can connect to each NXT just fine using the "Specify NXT" command, and both NXTs run independently and work great, however, I think my coding is preventing the fast polling of two NXT bricks. The polling stops after two conditions, 60 seconds have been reached, or both NXT Bricks have been locked in. However one of the major issues for me is displaying the time remaining while polling, also updating the NXT screen to display their current selection, as these sinifigantly reduce the pulling. I was hopping someone could suggest how to make this loop so that the person does not have to sit there and hold the button for it to be responsive.

 

My attempts:

I have attached a file named "Untitled 2.vi" which is an attempt I made at implementing both NXTs and a 60 second timer, however, the response is once again where they have to sit there and hold the button

 

I have attached the full code I have so far (Though errors will occur without the correct sound files and the Excel file needed to generate the question. I have used a "Disable" structure to highlight the area of the code I am having issues with and tried to discribe it the best I could.

 

Thanks in advance,

Brandon

Download All
0 Kudos
Message 1 of 3
(2,059 Views)

Hello BKish

 

I will take a look to your code, and let you know, I have several NXT Bricks at the office, so If you give some time, I will give your code a try!!

 

Regards

 

Mart G

0 Kudos
Message 2 of 3
(2,036 Views)

Thank you for replying. I actually sovled this in a mannor of speaking. I found that it was the interface for the bluetooth that was slowing the code down dramatically. The loop I created took 725miliseconds on avarage to repeat with the bluetooth interface. As soon as I connected the NXTs via USB, the loop executed at a constistant 32 miliseconds. A dramatic improvement. Although it was a disapointment not to be able to have the bluetooth interface with the NXT bricks, I think this solved my issue.

 

I would be intrested to hear if there were any developments on increasing the response time of bluetooth in gerneral however.

 

Thanks again

-Brandon

0 Kudos
Message 3 of 3
(2,028 Views)