Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

termination char

I have to communicate with a microcontroller, and I used the VISA SERIAL PORT.

 

The problem I runn into is that On the VISA Configure I set the termination char enable to false (NO TERMINATION CHAR); but it doesnt seem to work, when the termination char byte arrives at the port the reception is ended.

I debug the application and found out that the value of the  VI_ATTR_ASRL_END_IN attrivute is not changed to 0 as it should be when I set the termination char enabled to false.

I had to hardwire this attribute to 0 manually to make it work.

 

My question is; Is this a LabView Bug or am I doing something wrong ? Has it happend to any of you ?

 

Thankyou very much

Diego 

0 Kudos
Message 1 of 9
(3,863 Views)

What version of LabVIEW and NI-VISA are you using? The block diagram of VISA Configure Serial Port should look like the image below and it does correctly disable the termination character in all of the versions of LabVIEW that I can remember. Can you provide a screen shot of the VISA Configure Serial Port and the other information?

 

Message Edited by Dennis Knutson on 10-16-2008 10:45 AM
0 Kudos
Message 2 of 9
(3,853 Views)

Block diagram

I m usign LabView 8.20

I set the termination Char enabled to false on the Visa Configuration.

After that I monitor the ASRL END IN property and it remains in 2 (instead of 0 - what should be for no termination char)

So I m forced to set the property to 0 manualy.

 

Thanks Diego 

0 Kudos
Message 3 of 9
(3,844 Views)
Your image is not visible. Why don't you just attach it to your message? See the Add Attachments link right below the message body? Also, how about an image of your block diagram?
0 Kudos
Message 4 of 9
(3,835 Views)
I m usign LabView 8.20

I set the termination Char enabled to false on the Visa Configuration.

After that I monitor the ASRL END IN property and it remains in 2 (instead of 0 - what should be for no termination char)

So I m forced to set the property to 0 manualy.


Thanks Diego

PS: The image was the block diagram
0 Kudos
Message 5 of 9
(3,827 Views)
I don't have 8.2 to experiment with but I don't see the same behavior at all with 7.1, 8.5, or 8.6. I would suggest you try the same code without the case statement. Just try the VISA Initialize Serial Port in a new VI with a read of the property node. Why is the case statement there, what is in the True case, and when under what conditions is it true?
0 Kudos
Message 6 of 9
(3,819 Views)

The case statement is there because the hole thing is part of a larger program; the other case does not use the serial port so it is not initialized so it really doesn't matter.

 

It 's good to know that the other versions of Labview don't have the same problem although that doesnt resolve the problem.

 

Thanks for your help; and if you got any other ideas or sugestions please let me know!

 

0 Kudos
Message 7 of 9
(3,812 Views)
It does matter because if you aren't doing anything in the other case, then you are passing through the default setup of the serial port. That is why I asked to run the VISA Configure Serial Port outside of any case statement and see if you can reproduce the problem. I have not seen any reports of this type of problem in any versions of NI-VISA and I suspect it just might be a coding issue. It would be a fast and dirty test.
0 Kudos
Message 8 of 9
(3,800 Views)

Ok I ll try and make an example with out the case; although I m sure the program is going trhugh that case because I m debuging it and the other case has a pop`up dialog.

 

Anyway I 'll find some time toprogram a simpler example and post it.

 

Thanks 

0 Kudos
Message 9 of 9
(3,780 Views)