LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Intermittent Read of Instrument using Library LabVIEW VI's

Okay, that has some of the same problems as the regular basic serial example. This and the basic example should not be used in a loop. Do not configure and close the port in a loop.

 

Instead of a fixed delay and the Bytes at Serial Port, a bit more sophisticated approach would be to first use VISA Bytes at Serial Port in a loop. Exit the loop when the available bytes are greater than 0. Go to another loop with a VISA Bytes at Serial Port and exit this loop when the number of available bytes is 0.

 

Only use this when the command is supposed to return data.

0 Kudos
Message 11 of 15
(1,013 Views)

NI Support,

 

Based on the combined effort from myself and NI Support thus far to perform various debug attempts and gather findings with respect to the intermittent problem at hand, perhaps this problem should be reported and documented as a Specific Bug for this type of instrument communication protocol (ie - command sensing with no line terminator).

 

That beig said, I understand there most likely is not much demand for instrument drivers for old equipment such as this, but where I am from there has been some recent demand from various Chemist's to have me develop some process automation for this equipment to make there experiments less cumbersome and easier to run and manage.

 

If someone from NI Support can reply and provide me some feedback on this matter it would be greatly appreciated !

 

Thanks !

 

Barry

 

0 Kudos
Message 12 of 15
(971 Views)

I'm not sure what kind of bug that you think exists. I have successfully communicated to instruments that do not require a termination character on the write and do not send one with a read. There is no bug in the low level VISA functions. I have no idea what code you are running now or what kind of modifications you have made as a result of your contact with NI Support. I would suggest you post your existing code.

 

As I already mentioned, you probably need to do more than what is provided by the basic and advanced examples. If you are well and truly stuck, you can find an experienced LabVIEW programmer and hire him/her for a period of time. There comes a point where on line support is of limited value since you are the only one with the actual hardware.

0 Kudos
Message 13 of 15
(954 Views)

  Dennis,

 

  Okay, using the term "bug" is the wrong choice of words..... I agree, there is no bug in the low level VISA functions as I use them all the time in other LabVIEW Projects I am actively working on. What I am trying to say is possibly have another very simple and basic example VI written to specifically handle instruments that do not require a termination character on the write and do not send one with a read.

 

  You stated that you have successfully communicated with instruments that do not require a termination character on the write and do not send one with a read, would it be possible for you to post this code example for me ? If so, then I can try it out standalone with the instrument. If you don't have any example code written, possiblly your more sophisticated approach where VISA Bytes at Serial Port in a loop. If time permitted, would it be possible for you or someone else to create very basic code based on this premise for me to try ?

 

  Thanks !

 

  Barry

 

0 Kudos
Message 14 of 15
(943 Views)

Here's the basic idea of the read. The write is simple - just don't append a termination character.

 

 

 

Message Edited by Dennis Knutson on 01-07-2010 02:43 PM
0 Kudos
Message 15 of 15
(936 Views)