LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Difficulty reading data from a Ludlum radiometric detector (Model 4303)

Solved!
Go to solution
I am having great difficulty reading data from a Ludlum radiometric detector (Model 4303). I am suppose to get a CF and LF at the end of 48 characters but never see this. The information provided with the instrument is not very descriptive so it might very well be me that is doing something wrong. My code is not very neat but I add it anyway. Any suggestions I can try?
0 Kudos
Message 1 of 5
(2,912 Views)

no code...

0 Kudos
Message 2 of 5
(2,908 Views)

Sorry. Let me try the attach again.

0 Kudos
Message 3 of 5
(2,902 Views)

3X,

 

In your Configure Serial Port you have Enable Termination Character set True. This means that any Read operation will terminate when it finds the character. The default is line feed (decimal 10).  Any Read terminated this way will NOT have a line feed at the end of the Read Buffer string.  The line feed is stripped off by the Read function.

 

It is usually better to initialize the serial port outside the loop and to close the session outside the loop rather than repeating it over and over.

 

When using the termination character, you do not usually also wire the number of characters to read because it will stop when it reaches the line feed.  You wire the error clusters through the VISA functions and then do not connect it to the indicator so you may not be gettting error information. If you need to verify the presence of the carriage return, look at the last character rather than at a specific index.  Then if the string is shorter or longer than normal for any reason, you will not miss it.

 

The 50 ms wait may not do anything. Your serial port stuff likely takes longer than 50 ms.

 

You do not need the sequence structure.  Dataflow takes care of that.  Using the Latch When Released mechanical action fot the Start data and Stop data buttons eliminates the need for the local variables.

 

Lynn

0 Kudos
Message 4 of 5
(2,896 Views)
Solution
Accepted by topic author 3X

I feel like a complete idiot. I used the wrong baud rate. It works perfectly now. Thanks for the response.

0 Kudos
Message 5 of 5
(2,871 Views)