LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How get screen of tds3012b by rs232

That's not an error but a warning.

 

It says you asked for x number of bytes and thus received x number of bytes.  But there may be more bytes available at the port.  To me, that is kind of a stupid warning message.  If the program gives me what I asked for, then why are you warning me there could be more available.  As the programmer, I should already know whether I care there is more available.

 

It's not clear to me.  When you first hit that loop, are you getting zero bytes on the very first iteration?  Are you getting bytes at the port after one or more iterations?  When it finally does get to zero bytes at port, are you saying you think you still don't have all the bytes you were supposed to get?

0 Kudos
Message 11 of 18
(1,593 Views)

mmm2006 已写:

hi, Ravens Fan,

 

I had set 200 ms in loop,the second loop always exit becasue bytes at port return 0,

 

information just like below:

 

VISA:  (Hex 0x3FFF0006) The number of bytes transferred is equal to the requested input count. More data might be available.

 

So problem still exist.

 

thanks.


sorry for misunderstanding.

 

I mean In first capture, it seem be ok. But after capture again, it always exit quickley, just because  bytes at port return 0.

 

So should i wait for some time to do another capture?

 

br

 

mwt.

0 Kudos
Message 12 of 18
(1,591 Views)

How are you doing another capture?  By hitting the Run button again?  The last VI I saw that you posted did not have a while loop around it, it looked like a run once sort of program.

 

If you hit run again, then it should be waiting in the first while loop until there are bytes at the port.

 

You may need to wait awhile between captures.  It depends on your instrument, what does the manual say?  It might require some minimum amount of time to be able to reset itself and execute another capture.

0 Kudos
Message 13 of 18
(1,585 Views)

Hi,

 

Dennis advice me to use return of bytes to port vi to decide whether i shoudl exit second loop. the result is that it always exit without get enough

 

screen data. That printer icon still exist in device screen.

 

I just don't know how to handle it. In other test, i keep reading until timeout, it seem be ok. As you know, screen data is accumulated before

 

timeout. But i think it is not a good solution and maybe there is another better way.

 

the first loop can be exited before byte is bigger than zero, In second loop, these data is read. After that, bytes to port vi return zero and second loop

 

exit too.In fact, there is more data that need to be read.

 

In attached png file, only capture one time. But in fact, i need to capture many times. If i canot get a rational interval, my program cannot work

 

robustly.  I just worry about this. 😞

 

thanks. 

0 Kudos
Message 14 of 18
(1,580 Views)

How do you know that there is more data to be read? If the VISA Bytes at Serial Port says that there are 0 bytes available, then there are 0 bytes and that is all that the instrument has sent. Perhaps you are not using the correct command.

0 Kudos
Message 15 of 18
(1,575 Views)

Hi, Dennis,

 

In my side, the second capture just start, device screen display printer icon, which meaning hardcopy is going.

 

Maybe i should wait some time to captur after the previous capture finish.

 

thanks.

0 Kudos
Message 16 of 18
(1,561 Views)

Presumably, you also have the data displayed in LabVIEW. You could just print/save that.

0 Kudos
Message 17 of 18
(1,557 Views)

Hi, Dennis,

 

Thank you very much.

 

By now, I have to wait for some time to capture again. 😞

 

I will continue to find better solution.

 

thanks.

 

:womanvery-happy:

0 Kudos
Message 18 of 18
(1,524 Views)