LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wixel VISA read over USB

Hi all,

 

I'm trying to use the Pololu Wixel (https://www.pololu.com/docs/0J46) to read data from a Dexcom transmitter using this wixel app: https://github.com/StephenBlackWasAlreadyTaken/wixel-xDrip

 

I'll spare you the details of reading the docs; the Wixel receives a packet from the transmitter and transmits that packet over USB. It converts the packet from something the transmitter sends to a 7 byte package: 4 bytes for a uint32 payload, 1 byte for a battery reading of the transmitter, and 2 bytes for a battery reading of the wixel.

 

When I do a VISA read (the wixel is on a COM port if that helps), the VISA comes up with an error: (Hex 0xBFFF0015) Timeout.

 

I know the wixel is transmitting over USB (using CTS, baud rate of 9600), as it's showing that it's connected to the transmitter. I just think my labview VI is set up incorrectly. I've attached it for critique. Any help would be very much appreciated!

0 Kudos
Message 1 of 14
(3,538 Views)

Why don't you have the Serial Configure VI in there to be sure that the baud rate is set, termination character is disabled, and that it uses hardware flow control?

0 Kudos
Message 2 of 14
(3,528 Views)
Can you post an image of the block diagram, I'm posting from my phone?

I'm not sure I understand how you know the widget is transmitting. Can you read the data in MAX or another terminal emulation program? You should do that before trying to write any code.
0 Kudos
Message 3 of 14
(3,522 Views)

Added the serial configure, got a payload! But now it's giving this error: VISA:  (Hex 0xBFFF001E) The specified state of the attribute is not valid, or is not supported as defined by the resource.

 

What would be a good serial terminal to easily configure for a read? attached is a photo of the block diagram.Capture.PNG

0 Kudos
Message 4 of 14
(3,508 Views)
There are suggestions on the pololu web site. Your link was incorrect but it was easy to strip off the ) that you talked onto the end. Where In the documentation does it say to use cts? The web page says to start with no handshaking.
0 Kudos
Message 5 of 14
(3,503 Views)

The website doesn't say to use CTS; but the app that I loaded on (wixel-xdrip, the C code for it is under apps/dexdrip/dexdrip.c in the github repository) has CTS in one of the comments about the serial transfer, so I figured that was best to use. Neither PuTTy nor CoolTerm is getting anything, even though the Wixel has no blinking yellow LED ( from the app, that means that it's connected to the transmitter). This is disconcerting to say the least. What do you suggest I try?

0 Kudos
Message 6 of 14
(3,495 Views)

What input is that constant 32 wired into?  I'm sure that is why you have that error because neither 32 for a baud rate or for data bits would be valid for any COM device I've ever seen.

0 Kudos
Message 7 of 14
(3,489 Views)
It's a 4 byte payload. I'll try changing it!
0 Kudos
Message 8 of 14
(3,485 Views)

That number is for the number of data bits within the byte.  Usually either 7 or 8, most commonly 8.

 

Your 4 byte "payload"  is part of the 7 you wire into the VISA read so you can read 7 bytes.

0 Kudos
Message 9 of 14
(3,467 Views)
Ah I see. I'm getting real payloads now, when I remember to close the resource. How do I interpret the value as a number?is my byte array implementation functional? I keep getting nonsensical numbers for the uint32
0 Kudos
Message 10 of 14
(3,446 Views)