Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop Visa flushing directly after Write?

Using LV 8.0 with a serial mux module for dial indicators and having a problem/question on "Flushing". When I use Hyperterminal in conjunction with "Portman" to view what's happening everything works as great. With LV8.0 using Visa "config', Visa write viewing through "Portman" directly after the "Write" flushing occurs? I'm a novice at LV and might be missing something??? Any help would be apreciated. Thanks 

0 Kudos
Message 1 of 21
(3,877 Views)

Why?? using Portman port view when running Visa Write.vi directly after displays "Flushing" but with NI-Spy using the same vi shows nothiing?

0 Kudos
Message 2 of 21
(3,873 Views)

What kind of problem is the flushing causing?

0 Kudos
Message 3 of 21
(3,863 Views)

Error #1073676294

 

When viewed through Hyperterminal it shows a "flush" directly after a "write" but not NI-Spy??

0 Kudos
Message 4 of 21
(3,861 Views)

That is certainly not an error. It is a warning and not unexpected with the way you are doing a read. Since you have the termination character enabled, the VISA Read expects to see it. If the VISA Bytes at Serial Port returns some number less than what might be the complete response, you get the warning. Just ignore it.

 

If the instrument is actually appending a termination character, no need at all for the VISA Bytes at Serial Port. Just set the number of bytes to read to some high number. The read automatically terminates.

 

A search of the forum for the warning number would have gotten links to the same answer.

0 Kudos
Message 5 of 21
(3,857 Views)

I've tried raising the read bytes higher and receive a time out problem, tried playing with time and it's zero read?

 

The real question is why do I see a flush directly after a write but when running Hyperterminal this doesn't happen only a write?

0 Kudos
Message 6 of 21
(3,850 Views)

I really don't know why the behavior is this way but it's does not seem to be relevant to any sort of problem.

0 Kudos
Message 7 of 21
(3,848 Views)

Every time I read I get zero and viewing the port flushing directly after Write? Even the LV examples don't work.........?

0 Kudos
Message 8 of 21
(3,845 Views)

Your 'String Write' is wrong. You need to right click on it and select '\' Codes Display.

0 Kudos
Message 9 of 21
(3,840 Views)

Implemented your suggestion but it still "flushes" directly after "Write"?

 

0.00000475 LabVIEW.exe IOCTL_SERIAL_GET_BAUD_RATE Serial0 SUCCESS  
0.00000196 LabVIEW.exe IOCTL_SERIAL_GET_LINE_CONTROL Serial0 SUCCESS  
0.00000196 LabVIEW.exe IOCTL_SERIAL_GET_CHARS Serial0 SUCCESS  
0.00000168 LabVIEW.exe IOCTL_SERIAL_GET_HANDFLOW Serial0 SUCCESS  
0.00001425 LabVIEW.exe IOCTL_SERIAL_SET_BAUD_RATE Serial0 SUCCESS Rate: 9600 
0.00000922 LabVIEW.exe IOCTL_SERIAL_SET_RTS Serial0 SUCCESS  
0.00000922 LabVIEW.exe IOCTL_SERIAL_SET_DTR Serial0 SUCCESS  
0.00000754 LabVIEW.exe IOCTL_SERIAL_SET_LINE_CONTROL Serial0 SUCCESS StopBits: 1 Parity: NONE WordLength: 8 
0.00000643 LabVIEW.exe IOCTL_SERIAL_SET_CHAR Serial0 SUCCESS EOF:0 ERR:0 BRK:0 EVT:0 XON:11 XOFF:13 
0.00000754 LabVIEW.exe IOCTL_SERIAL_SET_HANDFLOW Serial0 SUCCESS Shake:1 Replace:40 XonLimit:64 XoffLimit:64 
0.00000168 LabVIEW.exe IOCTL_SERIAL_SET_QUEUE_SIZE Serial0 SUCCESS InSize: 640 OutSize: 640 
0.00000196 LabVIEW.exe IOCTL_SERIAL_SET_TIMEOUTS Serial0 SUCCESS RI:-1 RM:0 RC:0 WM:0 WC:500 
0.00000950 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS  
0.00003380 LabVIEW.exe IRP_MJ_WRITE Serial0 SUCCESS Length 1: R 
0.00000223 LabVIEW.exe IRP_MJ_FLUSH_BUFFERS Serial0 SUCCESS  
0.00000950 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS  
0.00003408 LabVIEW.exe IRP_MJ_WRITE Serial0 SUCCESS Length 1: 0 
0.00000196 LabVIEW.exe IRP_MJ_FLUSH_BUFFERS Serial0 SUCCESS  
0.00000978 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS  
0.00003297 LabVIEW.exe IRP_MJ_WRITE Serial0 SUCCESS Length 1: 1 
0.00000196 LabVIEW.exe IRP_MJ_FLUSH_BUFFERS Serial0 SUCCESS  

0 Kudos
Message 10 of 21
(3,832 Views)