LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sens-Tech P25 USB PMT ASCII code

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?

0 Kudos
Message 1 of 11
(793 Views)

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

0 Kudos
Message 2 of 11
(784 Views)

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.

0 Kudos
Message 3 of 11
(775 Views)

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

0 Kudos
Message 4 of 11
(760 Views)

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.

0 Kudos
Message 5 of 11
(715 Views)

And here is the VI

0 Kudos
Message 6 of 11
(713 Views)
Putting the ASCII strings CR and LF in your write is just silly. You are sending the characters 'C', 'R', etc. and not the actual termination characters. I know there is an option in the assistant for setting a single termination character but beyond that, I don't know because I never use it.
0 Kudos
Message 7 of 11
(705 Views)

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".

0 Kudos
Message 8 of 11
(698 Views)

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.

0 Kudos
Message 9 of 11
(691 Views)

Because I tried it in a different USB port.

0 Kudos
Message 10 of 11
(689 Views)