06-10-2011 08:32 AM
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
06-10-2011 10:37 AM
Why?? using Portman port view when running Visa Write.vi directly after displays "Flushing" but with NI-Spy using the same vi shows nothiing?
06-10-2011 12:17 PM
What kind of problem is the flushing causing?
06-10-2011 12:33 PM
Error #1073676294
When viewed through Hyperterminal it shows a "flush" directly after a "write" but not NI-Spy??
06-10-2011 02:15 PM
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.
06-13-2011 07:36 AM
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?
06-13-2011 07:46 AM
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.
06-13-2011 07:53 AM - edited 06-13-2011 07:54 AM
Every time I read I get zero and viewing the port flushing directly after Write? Even the LV examples don't work.........?
06-13-2011 08:27 AM
Your 'String Write' is wrong. You need to right click on it and select '\' Codes Display.
06-13-2011 09:51 AM - edited 06-13-2011 09:52 AM
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