LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial port not working anymore...problems with Windows XP?

Are you working with an application or just a regular vi? Are you having any errors? What exactly are you trying to communicate with ect......
0 Kudos
Message 31 of 44
(4,895 Views)
Also, use the configure serial port VI to make sure your serial settings are correct.

___________________
Try to take over the world!
0 Kudos
Message 32 of 44
(4,892 Views)
I'm using the VI labview-serial VI in the labview exemple code. I'm trying to communicate with an Hemodialysis machine which have a serial port. This VI use the configure serial port VI. When I write to the port, it seems to work properly (the VI tells me that there`s no error). When I read, the only error I got is the timeout. It look like the machine doesn't answer my query. But, if i'm using the measurement and automation explorer and I open a visa session with the serial port, I can communicate without any problem. I can send a query to the machine with visa write then read the answer with visa read. Is there any difference between the visa write\read in labview and the visa write\read in MAX? I try the same process with windows XP and 98 witout any success. I have labview 6i.
0 Kudos
Message 33 of 44
(4,876 Views)
Are the serial settings (baud rate, parity and so on) you're wiring into the config VI correct? You can check the correct ones by using Hyperterminal (Start>>programs>>accessories>>communication) to talk with your device. You can probably find these settings in MAX as well.
Also, what is the timeout you give the config VI? It needs to be large enough. If the instruments receives a command and immediately responds, you should have the Read VI immediately after the Write VI to receive this response.
I don't think there's any difference between VISA in LV and VISA in MAX. They probably use the same functions.

___________________
Try to take over the world!
0 Kudos
Message 34 of 44
(4,865 Views)
In your LabVIEW VI are you adding a terminator? The default write string in MAX is *IDN?\n. You need to add the \n to your LabVIEW code. Be sure to add the actual control character and not the characters "\" and "n". If you're using one of the shipping examples, turn on '\' Codes Display to correctly enter it.
0 Kudos
Message 35 of 44
(4,261 Views)
In MAX I can write the following string ( PR,0010\r ) to the port then the machine will send me the answer every 10 second. If I read the port, the value keep coming. I try the same string in LV without success. I also try to put the termination character in the code (13 or 0xD for cariage return), so I was writing ( PR,0010 ) to the port and it does't work either. I also try to send the query (PR,0010\r)with MAX then close it and read the port with LV and it works as well. So I think that I'm not writing to the port properly with LV. But if it works with MAX, is it not suppose to work in LV? I'm using all the default port setting, the same that MAX is using. I just want a send this simple string ( PR,0010\r ) to the port and it don't works. Help please!!!
0 Kudos
Message 36 of 44
(4,845 Views)
In MAX I can write the following string ( PR,0010\r ) to the port then the machine will send me the answer every 10 second. If I read the port, the value keep coming. I try the same string in LV without success. I also try to put the termination character in the code (13 or 0xD for cariage return), so I was writing ( PR,0010 ) to the port and it does't work either. I also try to send the query (PR,0010\r)with MAX then close it and read the port with LV and it works as well. So I think that I'm not writing to the port properly with LV. But if it works with MAX, is it not suppose to work in LV? I'm using all the default port setting, the same that MAX is using. I just want a send this simple string ( PR,0010\r ) to the port and it don't works. Help please!!!
0 Kudos
Message 37 of 44
(4,844 Views)
Take the example VI that you're using and enter your string into the front panel control. From the Operate menu, select Make Current Values Default. Now save the VI. Post this VI to the forum so we can look at what you're actually sending.
0 Kudos
Message 38 of 44
(4,831 Views)
spaceman, what kind of windows prog. did you use to test the port. I want to use it too.
regards
0 Kudos
Message 39 of 44
(5,727 Views)

To see if your serial port is working properly, it is normally best to use Hyperterminal (should be in Start>>Programs>>Accessories>>Communication).

If you want to see the data going through your port, you can look for a program called PortMon.


___________________
Try to take over the world!
0 Kudos
Message 40 of 44
(5,713 Views)