From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-17-2006 10:13 AM
02-17-2006 10:13 AM
with no delay, here is what I mean by the program terminates on an indeterminate number of loops. It works for the first few MOV then POS query pairs, then it stops working permanently returning zero bytes.
I've tried all flow control variations, including the recommended RTS/CTS and nothing is fixing this. Very confused.
0.00004665 LabVIEW.exe IRP_MJ_WRITE Serial0 SUCCESS Length 11: MOV A1.125.
0.00000307 LabVIEW.exe IRP_MJ_FLUSH_BUFFERS Serial0 SUCCESS
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00467881 LabVIEW.exe IRP_MJ_WRITE Serial0 SUCCESS Length 7: POS? A.
0.00000391 LabVIEW.exe IRP_MJ_FLUSH_BUFFERS Serial0 SUCCESS
0.00000698 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000726 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000670 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000559 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000643 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000670 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000643 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00001090 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000950 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 7: 1.1053.
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000698 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00004833 LabVIEW.exe IRP_MJ_WRITE Serial0 SUCCESS Length 11: MOV A1.187.
0.00000279 LabVIEW.exe IRP_MJ_FLUSH_BUFFERS Serial0 SUCCESS
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00053359 LabVIEW.exe IRP_MJ_WRITE Serial0 SUCCESS Length 7: POS? A.
0.00000279 LabVIEW.exe IRP_MJ_FLUSH_BUFFERS Serial0 SUCCESS
0.00000643 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000754 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000670 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000643 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000670 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000643 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
02-17-2006 10:19 AM
02-17-2006 10:24 AM
You've got it, timeout sends the ERR? command and the POS? A command just to keep track of what's going on. That works fine. I didn't include it because I'm limited to 5000 characters here.
The error occurs when I click on the Scan boolean. This enques the number of samples s on the front panel (x2 because there is also a query POS? A command for every MOV command). You can see this as the ScanOnOff value change event. This enqueues several hundred elements which are then dequeued by the consumer loop as quickly as possible. The fact that timeout might occur when these elements are being processed is not relevant, it just adds the timout elements to the end of the queue.
The error is occuring, according to LV, after the serial read function. But that is at odds with
1. What sysmon is telling me.
2. The fact that when rerunning the program, my device returns error 1 which corresponds to a syntax error (even though you can see from sysmon that the syntax is apparently unchanged!).
0.00004246 LabVIEW.exe IRP_MJ_WRITE Serial0 SUCCESS Length 5: ERR?.
0.00000279 LabVIEW.exe IRP_MJ_FLUSH_BUFFERS Serial0 SUCCESS
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
...
0.00000643 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000643 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000810 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 2: 0.
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000643 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00003548 LabVIEW.exe IRP_MJ_WRITE Serial0 SUCCESS Length 7: POS? A.
0.00000223 LabVIEW.exe IRP_MJ_FLUSH_BUFFERS Serial0 SUCCESS
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000670 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
...
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000643 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000643 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000670 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000643 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000643 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000559 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000615 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 0:
0.00000587 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00001117 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00000978 LabVIEW.exe IRP_MJ_READ Serial0 SUCCESS Length 7: 4.5171.
02-17-2006 10:26 AM
02-17-2006 10:39 AM
02-17-2006 10:40 AM
The only thing that has occurred to me is the following
0.00004414 LabVIEW.exe IRP_MJ_WRITE Serial0 SUCCESS Length 11: MOV A1.249.
0.00000279 LabVIEW.exe IRP_MJ_FLUSH_BUFFERS Serial0 SUCCESS
0.00000615 LabVIEW.exe IOCTL_SERIAL_GET_COMMSTATUS Serial0 SUCCESS
0.00053247 LabVIEW.exe IRP_MJ_WRITE Serial0 SUCCESS Length 7: POS? A.
0.00000279 LabVIEW.exe IRP_MJ_FLUSH_BUFFERS Serial0 SUCCESS
The program always falls down when two writes are back to back as quickly as possible, Could it be that the flush_buffers command is not actually clearing the memory properly before the POS? A command is being written, resulting in a corrupted message being sent to the device?
...but then why would portmon say that POS? A has been written successfully?
02-17-2006 10:47 AM
02-17-2006 10:51 AM
02-17-2006 11:00 AM