09-21-2011 05:13 PM
Hi,
This is my first post so please don't flame me for bad programming, etc. I'm trying to talk via TCP/IP communication to a power supply to get a reply to the standard *IDN? commmand. I am successfully communicating with the device via hyperterminal without errors and the instrument appears in MAX and I can open a VISA test panel. When I execute my VI everything is OK but the reply I get is "HTTP/1.1 400 ERROR"
Does anyone have any idea what I may be doing wrong?
Thanks,
Kevin
09-21-2011 09:23 PM
Why aren't you using VISA in the VI? What's the instrument? Did you search for an existing driver?
09-22-2011 08:00 AM
sounds like you are connecting to port 80 (web server) you should be connecting to the control port which could be 5025 or some other port which you need to find out what it is. If hyperterminal is working correctly what port are you using there 23 maybe?
09-22-2011 10:23 AM - edited 09-22-2011 10:25 AM
09-22-2011 10:27 AM
My first reply got messed up but thanks for the replies. I'm using port number 10001 with Hyperterminal so I'll change the port assignment on the VI to see what happens. I thought I tried this and it didn't work but I'll give it another shot.
I have found some drivers for my device (Ametek XG40-21 Power Supply) but I'm getting errors using them and so far I have been unsuccessful at getting support from them. Maybe I'll post the errors here to see if someone can help. I'm very new to LV so things are moving slowly.
09-24-2011 10:53 AM
I started to get a response from the power supply using port 9999 but it seemed like I was talking to the Ethernet port instead of the power supply. It looked like I was talking to the Lantronix port (9999) instead of the power supply port (10001). When I switch MAX to communicate over port 10001 I would not get any reply. I probed the string wire and was sending *IDN?\n so I thought it would reply on that port. I have the bytes to get set at 70 which should at least get something.
Any other ideas?
Thanks,
Kevin
09-24-2011 02:02 PM
I'm trying to understand what you are actually doing. You've got an instrument that MAX has detected and you say you can communicate with the VISA Test Panels. Then you are using the TCP functions instead of VISA/MAX? You also said you tried the driver and got some errors. You must provide the error codes.
One other question. Did MAX automatically detect it or did you have to provide the IP and port?
09-25-2011 02:57 PM
Thanks Dennis,
I'll post a detailed description of my issues tomorrow when I get back to work. As far as MAX goes, I did have to provide the IP address and port in order to successfully open a VISA session. Also, I redid the program using VISA instead of TCP commands, that vi is attached.
More to follow tomorrow.
Kevin
09-26-2011 12:34 PM
Here is the updated situation on my comm issue I'm having. First, the hardware setup:
Hyperterminal results
MAX Setup
VISA Test Panel
I think I am having some sort of error with the termination command but I have tried everything I can think of and nothing works. Does anyone have any idea what I could be doing wrong?
Thanks in advance for the help.
Kevin
09-27-2011 07:59 AM
I think you are on the right track with the termchar. By default in Visa it is linefeed whereas the default in Hyperterminal is carriage return unless you configure it to append linefeed. Use Wireshark to look at the packets.