> I am doing a project where I am suppose to build a Bluetooth software using LabVIEW
> to replace the current Bluetooth software for a set of timing lights (uses Bluetooth as
> means of communicating with the computer).
There are really two separate tasks here - first, getting registers (or variables) for the timing lights.
The second task is transmitting the data by Bluetooth radio/software.
> 1. The timing lights are on. A set of 7 pairs. One emitter and one receiver each.
So each receiver is a separate Bluetooth radio? Then when you do a "Bluetooth Discover"
you should find (at least) 7 addresses (listed for example as 12:34:56:7a:bc:de").
Use each of these addresses as an input to a separate "Bluetooth Open" - which will give
you 7 separate connection ID's. Most likely you will use Channel 1 for the Bluetooth Open too.
Then it's simply a matter of using "Bluetooth Read" to listen for any response. I use a 1ms
timeout and ignore timeout errors ("the device just doesn't have anything to say"). You
may always expect a response from yours (light or no light), or you may want a longer timeout,
and/or use a timer so that you aren't polling every microsecond.
> 2. When the connection between the emitter and receiver is broken, a signal is sent to the computer.
> I was wondering if it was possible to just create one Bluetooth VI which is able to just acquire,
> process and present the signals (either light received or not) from the timing lights just like a data acquisition VI.
Sure. I would use a state machine. The "initialize" would do a discover (if you don't have the addresses
hard coded). You may need some method of selecting devices so that you don't get everybody's
cell-phone head set.
Then go to state "open" where you open all 7 bluetooths. Pass the 7 connectID's to the "Read" state
where you read the current data from all 7 receivers. (If you have to write a message to them before
you can read a response, be sure to do that too.) This data is presented on the panel in any
format you desire. Put in the desired time-delay/polling rate and continue in the "Read" state.
The Stop button on your panel takes you out of the Read state and goes to the Disconnect state
where you disconnect all 7 bluetooths.
That should do it.
~~Les Hammer