03-01-2014 02:04 PM
Hello, I have a Sens-Tech P25 USB PMT for use in a experiment. I have used VISA to install the driver for the tube and it is registering as COM3. When I am trying to use LabVIEW's Instrument Assistant, I have a write followed by a Read and Parse command. For the write I have tried various ASCII codes (from the manual for the PMT tube R10 would start 10 readings).
So I have tried R10 (with the default termination character \n). I have also tried other different termination characters \r\n and \r. I get the read command BC (bad command) followed by a timeout error.
Does anyone have any help they can give me?
03-01-2014 02:26 PM
What is the exact protocol for the device? Does it terminate with line feed, carriage return, or both? Are you sure you are actually sending line feed and not a "backslash" character followed by "n"? Check the display mode on the string constant or string control where you entered the character(s) and make sure it is set to '\' Codes Display.
Please post your VI.
Lynn
03-01-2014 02:45 PM
From the manual for the PMT, CR and LF are termination commands. I won't be able to post my VI till Monday (as it is all on the university computer).
What would you suggest, I set the LabVIEW instrument assistant termination character to <none>. And use *mycommand*CRLF?
I'm quite confused haha.
03-01-2014 04:52 PM
I never use the Instrument Assistant, so I am not sure what it does. I just use the VISA Write and Read VIs.
Usually you can just use the default LF as the termination character. The only time that would be a problem is if the instrument is sending binary data and a LF character can occur in the data set. The other thing you need to check is whether the Instrumentation Assistant sends termination characters. By default the VISA Write does not do so. Even if IA does append a termination character, it will only append one character, the LF. So you still need to explicitly append the CR, and probably both CR and LF.
For receiving you definitely want to use termination characters because you always get complete messages so that the parsing is simpler.
Lynn
03-03-2014 08:04 AM
So this is my VI, don't worry about any of the other things in it, they are to control a motor, used to turn the prism. What I have done is just used the instrument assistant. I have attached Pictures below.
Also how do I use the VISA read and write.
03-03-2014 08:05 AM
And here is the VI
03-03-2014 08:10 AM
03-03-2014 09:37 AM
So checking the NI-MAX, its saying there is an invalid property for "Is the port connected". When I had the PMT as a USB, i could write and read using NI-MAX, but i couldn't use it in LabVIEW. And now it is a COM port I can see it in LabVIEW but it isn't "connected".
03-03-2014 09:55 AM
Why in the first set of pictures, your Instrument is set for Com3, but in the most recent picture, you are looking at com4?
That last picture doesn't say that it isn't connected. It says that the "Is Port Connected?" property is not one that is supported by the serial port.
03-03-2014 10:00 AM
Because I tried it in a different USB port.