LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

US Digital QSB-S resets when disconnected

Hello everyone, 

 

I am adding the QSB-S functionality to a bigger data acquisition program that was created using labview. The code for the QSB-S works fine when connected to the VI (please see the attached VI), the problem is that if the QSB-S gets disconnected and connected again it will reset the counts to zero, I guess that's the default option, but I need the program to keep the last value read by the QSB-S if it gets disconnected and continue the reading from there when it is connected again. Is this possible? any ideas? 

 

I hope you can help me. 

 

Regards, 

Luis

0 Kudos
Message 1 of 4
(1,006 Views)

Hi Luis,

 


@LuisRuiz wrote:

the problem is that if the QSB-S gets disconnected and connected again it will reset the counts to zero, I guess that's the default option,


Are you talking about those devices? Well they are bus-powered, so disconnecting and plugging-in again will surely reset them…

 


@LuisRuiz wrote:

but I need the program to keep the last value read by the QSB-S if it gets disconnected and continue the reading from there when it is connected again. Is this possible? any ideas? 


You need to detect in your software when that devices gets disconnected: you should receive some errors messages then.

When such an error occurs you just store the last reading in a shift register. When the devices gets connected again and restart to count from zero you just add the stored value to the current readings…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(970 Views)

Did you get an error when you build your program and ran the executable? 

 

Error 4 occurred at Read from Binary File

Possible reason(s):
LabVIEW: End of file encountered.

0 Kudos
Message 3 of 4
(733 Views)

Hi. I now its been long but do you still have the "Counter Math QSB-S subvi"?

0 Kudos
Message 4 of 4
(157 Views)