LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time out error while reading analog signal

hello all : )

 

 im using advantech usb 4704 for aquiring analog signal. im using it in finite mode with  following details

 

  sampling rate = 20k

  no. of samples to acquire = 120k

 no. of samples to read = 120 k

 

     sometimes (after running my program around 120  times) i get the error "time-out while reading" on reading function. the  error  then keeps repeating for every trial unless i unplug and plug usb. it then  runs smoothly but comes up again after around 120 trials.

    i tried various  sampling configuration with no success.

 

note the error goes only when i unplug and plug it back which means im resetting my device. i guess it has something to do with overloading of buffer. is there anyway  to clear the buffer completely ?? please help me.

0 Kudos
Message 1 of 11
(3,632 Views)

@gargrahul wrote:

hello all : )

 

 im using advantech usb 4704 for aquiring analog signal. im using it in finite mode with  following details

 

  sampling rate = 20k

  no. of samples to acquire = 120k

 no. of samples to read = 120 k

 

     sometimes (after running my program around 120  times) i get the error "time-out while reading" on reading function. the  error  then keeps repeating for every trial unless i unplug and plug usb. it then  runs smoothly but comes up again after around 120 trials.

    i tried various  sampling configuration with no success.

 

note the error goes only when i unplug and plug it back which means im resetting my device. i guess it has something to do with overloading of buffer. is there anyway  to clear the buffer completely ?? please help me.


 

 

 

The Advantech isn't a NI product.

Read their manual.

 

0 Kudos
Message 2 of 11
(3,630 Views)

Have you installed the appropriate LabVIEW drivers?  Does it show up in MAX?  Can you "test" it in MAX?  

 

Show us the LabVIEW code you are using and answer the above questions, please.

 

Bob Schor

0 Kudos
Message 3 of 11
(3,589 Views)
Only NI devices will show in MAX so you can't do that.

Besides checking with Advantech's support, I would recommend setting the number of samples to something less than or equal to the sample rate. In other words, no more than 20k samples. If you need more, use a loop and acquire to an array.
0 Kudos
Message 4 of 11
(3,576 Views)

This sounds a lot like a Windows settings issue.  If you go into the Device Manager and dig into the settings for the USB hubs, you will find a setting for a Windows "power saving feature" where it will turn off the USB hub.  Make sure that is turned off.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 11
(3,551 Views)

Dennis_Knutson wrote:
Only NI devices will show in MAX so you can't do that.


Sorry to disagree, but I see two cameras, a Microsoft LifeCam USB camera and an Axis IP camera, on MAX.  Also, there are a number of third parties (whose names I'm forgetting) who make USB devices that show up in MAX.

 

Bob Schor

 

 

0 Kudos
Message 6 of 11
(3,537 Views)
You've never used another brand of days acquisition devices have you? That is the topic and not cameras that follow a specific standard.

USB devices that show in MAX are USBTMC, RS-232 converters, and devices that used the VISA wizard. Again, off-topic from the original question about advantech DAQ devices.
0 Kudos
Message 7 of 11
(3,525 Views)

 the usb device wont appear in max as it is a product of advantech. they have provided there own application similar to max named advantech navigator. the device can be seen there.

 

im attaching my vi in the attachment.

altho you need to have daqNAVI to open it without any errors but still u can understand the flow of my process with the help of tags.

 

i turned off the usb power settings of generic usb hub and usb root hub. so lets see if it will work.

 

yes the number of sample im acquiring is more than the sampling rate.

my sampling rate is 20k whereas im acquiring 140k samples.

i have to acquire signal for long duration. in this case im acquiring signal for around 7 sec.

sir can u elaborate on why should i keep no. of samples to acquire around sampling rate because the program is simple with no loops and it works fine for around 100 times.

 

0 Kudos
Message 8 of 11
(3,498 Views)

Sorry, but we cannot see your VI's code because you password protected it.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 11
(3,480 Views)

sorry

 

please find the password-unprotected vi in the attched file

0 Kudos
Message 10 of 11
(3,439 Views)