LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help with serial communication

Hi everyone,

I'm trying to talk to a device using VISA serial but I have difficulty getting it to work. I've done this before with a different device and I'm following the same steps for this new device with no luck so far. 

 

Here are the steps I tried:

1) Before I configured the port, the device manager was able to see the port. Also, I was able to control the device using the provided software for the device.1.jpg

 

2) I used NI-VISA Driver Wizard to configure the port. The software automatically filled in the options and I made no change to them.

2.PNG

3) After installing the .inf file, the port appeared in the device manager as this:3.PNG

 4) NI MAX also recognized the port 4.PNG

 

 

5) The communication settings in MAX I/O5.PNG

 

6.PNG

 

7.PNG

 

 

 

There was no error when I sent in a command, but when I tried to read the buffer, I kept getting timeout error. The device uses checksum as the terminating character which I'm still trying to understand. However, according to the manual, I should be getting a message back regardless of what I send in. I think MAX isn't not communicating with the device at all.

 

Please help!

 

Thank you

 

 

0 Kudos
Message 1 of 5
(2,226 Views)

Have you tried using Wireshark to capture the USB comms ? It may give you some clues.

 

0 Kudos
Message 2 of 5
(2,149 Views)

Sorry for the stupid question, but how are you sending messages and trying to get responses from the device?

 

Given that you don't have a termination character, and the message seems to require parsing to know the length (it looks from the manual that the response is always 8 bytes, but the message reply can vary between 6 and 255 depending on the value of the length data byte), I'm wondering how you're managing in MAX. Or are you using LabVIEW?


GCentral
0 Kudos
Message 3 of 5
(2,136 Views)

When I hear "serial communication" I assume it's through a serial port (real or virtual) that appears as a COM port in Windows. I know technically USB is serial, but that's not usually what "serial communication" refers to. Is it possible that this USB device also appears as a COM port, maybe the "COM1" you have listed in MAX, or if that's not it, maybe there's an option in the driver properties to enable a virtual COM port? That would probably be simpler than doing USB communications like this.

0 Kudos
Message 4 of 5
(2,129 Views)

can you share your vi? 


CLD Using LabVIEW since 2013
0 Kudos
Message 5 of 5
(2,085 Views)