LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Communication with Agilent Vacuum Pump

That was kinda my initial thought haha. I just wonder why this isn't working. Just to outline my steps:

 

1. I open a VISA session. All the settings, such as baud rate and parity, match.

 

2. I write the string of numbers (Hex display on) as indicated by the manual.

 

3. I expect a string of numbers back from the controller, but instead I get nothing back and then I timeout.

 

I'm really just at a loss here. At least I've learned a bunch of other stuff from this thread.

0 Kudos
Message 21 of 42
(3,212 Views)

Your CRC "algorithm" is correct in post #8. However, take chembo's advice and display the radix of all your constants. I have a feeling you are entering them as decimal. i.e., 80 (decimal) is not the same as 80 (hex) and WILL give you a different CRC result. Secondly (but I don't think it will matter), you have a red coercion dot on your XOR indicator. Your constants should be defined as U8.

 

As far as developing a driver, read the manual. All the commands should be listed there. It is just a matter of figuring out what you want to do with the Vacuum Pump. Get the syntax of this command correct and working over the serial port, and the rest will be relatively easy.

0 Kudos
Message 22 of 42
(3,212 Views)
Try using a sniffer such as portmon to check what the vendor's program is sending. Then use I/O Trace as already mentioned to see what your program is sending.
0 Kudos
Message 23 of 42
(3,203 Views)

Again, get the syntax correct. If you send it a bad command, the controller will ignore it and do nothing. That is probably why you time out. Double check, triple check the syntax, and also the serial port. Also, I've been bitten a few times by bad cables, or mis-wired connectors.

0 Kudos
Message 24 of 42
(3,197 Views)

I figured out the 84. You were right jamiva, I wasn't displaying hexdecimal on the front panel. Once I changed that I got 84 as the XOR. I believe I have the correct radix on my numbers, unless you see something wrong?

 

code6.PNG

 

And I also did the NI I/O Trace like a few of you suggested, and from the looks of it it looks like nothing is being read, which is what we expected I assume. Here is a screenshot of what Trace told me.

 

nitrace.PNG

 

Dennis, I'll go ahead and try out that portmon program you mentioned. I've never used it but I'm sure it's nothing a quick Google can't teach me. Then maybe I can compare what it is sending to the controller to mine.

0 Kudos
Message 25 of 42
(3,190 Views)
What's being read is irrelevant. We already know that nothing is being read and that you get a timeout. What's important is what it's being written.

P.S. Get rid of that VISA Open after the port configuration

Portmon is a Microsoft utility.
0 Kudos
Message 26 of 42
(3,180 Views)

Longshot: The VISA Configure Serial Port defaults to enabling a termination character. You manually set it to 0x03 and you already put it in the command string. The VISA write may be putting two termination characters in the command. Try disabling it (set to FALSE).

0 Kudos
Message 27 of 42
(3,110 Views)

Or try leaving with the default termination character 0x0A

0 Kudos
Message 28 of 42
(3,095 Views)
The VISA Configure Serial Port does nothing for a write termination character. It only sets it for a read.
0 Kudos
Message 29 of 42
(3,090 Views)

Now it seems that the serial communication sequence and the data going to the controller is fine. You said also it is possible to connect to the controller with some Agilent software, so the cable should be fine.

  • Are you using a USB to serial adapter. If this is the case, are you sure that it is USB to RS232 or USB to RS485. For the latter, the address may not be 0x80. This will change also the checksum.
  • You may also check, if it is needed to enable the serial communication of the controller. The Agilent software may work, but this doesn't mean that the type of communication you are trying to use is enabled too.

 

 

0 Kudos
Message 30 of 42
(3,063 Views)