LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ANT+ Sensors

Is there a way to take data from an ANT+ sensor and input to LabView?

Message 1 of 11
(6,460 Views)

Hi Macman,

 

What model sensor are you using?  Can you tell us a little more about your application and what you want to do with the data?

Dave C.

Applications Engineer
National Instruments
0 Kudos
Message 2 of 11
(6,436 Views)

 The ANT+ sensor is a Garmin Heart Rate Sensor https://buy.garmin.com/shop/shop.do?pID=10996 which is paired with a Digikey Wireless USB receiver http://www.digikey.com/scripts/dksearch/dksus.dll?FV=fff40036,fff803ed&vendor=0&mnonly=0&newproducts...

The application is to simulate a display of the output from the heart rate sensor

 

0 Kudos
Message 3 of 11
(6,423 Views)

Hi Macman,

 

It may be possible, but without Garmin's protocol information I suspect it will be quite difficult.

 

That said, it looks like this device is intended for use only with other Garmin devices.  Have you used, or seen it being used with non-Garmin devices?  If so, how?

Dave C.

Applications Engineer
National Instruments
0 Kudos
Message 4 of 11
(6,392 Views)

Hi,

 

There is alot of information on the ANT+ sensors at www.thisisant.com

 

You can get a copy of the ANT protocol from here https://www.sparkfun.com/datasheets/Wireless/Nordic/ANT-UserGuide.pdf this should start you in the right direction.

0 Kudos
Message 5 of 11
(6,383 Views)

Agree with Brett_J, the ANT+ protocol is not specific to Garmin sensors. Any ANT+ device can communicate with any 

other ANT+ device, pairing in much the same way as Bluetooth

0 Kudos
Message 6 of 11
(6,373 Views)

Hello Brett_J, Hello Macman,

 

how did you solve the problem? Can you give me some tips to realize in labview?

 

Thanks for your help!!!

 

Message 7 of 11
(6,258 Views)

I am working on this problem now with a Garmin Vector pedal, but we will soon integrate with the Garmin heart rate sensor as well.  I have about 2/3's of a beta version developed as an OO project.  I'd be happy to share it when it's relatively stable.  Alternatively, I could send you my non-OO proof-of-concept code.  It's not pretty nor does it do very much, but it might save you some time.

 

My basic plan was the following:

 

1) Use NI-MAX and VISA test panel to verify that I can communicate with the device (via ANT USB stick)

2) Figure out which messages it was sending (I had to use the ANT+ protocol document referenced above)

3) Figure out which messages I needed to send to it (luckily someone else in my lab had already done this)

4) Write a proof-of-concept data-flow-oriented program to do some basic I/O

5) Design and implement an OO version

 

The hardest part was deciphering the message formats from the protocol documents.  There are a couple of different places you need to look.  Let me know if you're still looking and I'll dig up the sections I used.

 

My OO design so far is as follows:

 

1) Device class to hold device data (device name, locations of files to read/write data from, etc)

2) Message class to hold message data and message-specific "Process Message" fuction (i.e. if it's a Power or Crank Torque message, update the GUI)

3) Attempting to use the factory pattern/dynamic class loading to load and process the messages from the device

4) Consider creating a Session class to hold higher-level data (e.g. channel #, network ID)

 

Upon reading power from the pedals, I am streaming data via TCP/IP to a MATLAB/Simulink program, because we have a feedback control system already coded and tested.  I would like to eventually either (a) implement the control system in LV or (b) migrate both the LV part and ML/SL part to C/C++.  We looked into reading the ANT+ data into MATLAB and abandoned that route due to complexity.

 

I'm sure I'm not utilizing LV in the most efficient means possible so I'd actually appreciate some feedback. I will post the code I get the process-message part working.  For now, I attached a screenshot of the main program's block diagram.

 

I'm also not sure LV will be fast enough to either stream data to MATLAB or run the control loop itself.  Are there any good timing tools for LV?

 

Thanks,

 

-Jamie

0 Kudos
Message 8 of 11
(5,985 Views)

Sorry, I double-posted so I'm editing this one to say "Sorry, I double-posted, etc"

0 Kudos
Message 9 of 11
(5,984 Views)

Is it possible to get your code for this app?

 

 

0 Kudos
Message 10 of 11
(3,719 Views)