Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

How can I reset the U6 Labjack unit?


  • Please log in to reply
27 replies to this topic

#1 user1979

user1979
  • Members
  • 62 posts

Posted 28 February 2013 - 02:20 AM

Hello, I am using a Labjack U6 module with Labview 2011. In my program I am measuring 2 duty cycles using twice the "U3 PWM16 and duty cycle", and using the "U6 Easy stream" example to measure 2 analog inputs. I am running the measures as fast as possible, getting a measure every 4 secs. After 1, 2 or 3 days the The Labjack kind of blocks. The while loop is running because I can stop the Vi with the Stop button. When I try to restard the program I get this error message : Labjack Error #1008 : Communication error failure occured at LJUD_OpenLabjackS.vi". Only the yellow LED of the Labjack is on, the green is off. I have tried using the "Close All" VI in another empty VI, but it doesn't change anything. The only thing to do is to unplug ths USB connexion and put it bak. I haven't done it this time in order to leave the Labjack blocked and see if I can find a software solution. It is not a problem for me getting every now an then the 10008 error but I would like to be able to restart automatically the labjack when it happens. Would you know how I can do this? Thanks a lot, User

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 28 February 2013 - 08:37 AM

See the following for various ideas and things to test:

http://labjack.com/s...ication-failure

Using the watchdog to have the U6 reset if it does not receive any communication for 20 seconds might be a quick fix for you.

#3 user1979

user1979
  • Members
  • 62 posts

Posted 01 March 2013 - 02:24 AM

Hi, Thanks for your answer. I have opened up the simple watchdog Vi but I am not quite sure how it should be used. Should it be running in a parallel with my main loop so that it is checking the USB state every Xsecs, should it be running in the main loop in serial with each of my activities (stringed to my easy stream sequence for instance), or should it be running in the main loop but in a sequence after or before each activity? Thanks User

#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 01 March 2013 - 10:08 AM

No. Typical usage is to just enable the watchdog at the beginning of your program, and then disable the watchdog when your program closes or ends.

The watchdog settings are nonvolatile, so if you enable the watchdog and then kill your program without disabling the watchdog, the watchdog will continually timeout if no other software is talking to the U6.

http://labjack.com/s...rs-guide/4.3.13

#5 user1979

user1979
  • Members
  • 62 posts

Posted 04 March 2013 - 02:18 AM

Ok I understand. When the labjack is blocked, and no other program is running, if I run the Simple Watchdog VI should that work and unblock the U6 module? Concerning the disabling of the watchdog at the end of the program, shall I change "LJ_chSWDT_ENABLE" to "LJ_chSWDT_DISABLE" in the string to constant array and/or unpress the "Enable Watchdog w/Reset button" Thanks, User

#6 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 04 March 2013 - 10:45 AM

When the labjack is blocked, and no other program is running, if I run the Simple Watchdog VI should that work and unblock the U6 module?

I am afraid I don't understand what you mean by blocked and unblock.

Concerning the disabling of the watchdog at the end of the program, shall I change "LJ_chSWDT_ENABLE" to "LJ_chSWDT_DISABLE" in the string to constant array and/or unpress the "Enable Watchdog w/Reset button"

The former is correct. To turn off the watchdog, you want to use iotype LJ_ioSWDT_CONFIG with special channel LJ_chSWDT_DISABLE.

#7 user1979

user1979
  • Members
  • 62 posts

Posted 05 March 2013 - 08:19 AM

1)

When the labjack is blocked, and no other program is running, if I run the Simple Watchdog VI should that work and unblock the U6 module?

I am afraid I don't understand what you mean by blocked and unblock.


2)

Concerning the disabling of the watchdog at the end of the program, shall I change "LJ_chSWDT_ENABLE" to "LJ_chSWDT_DISABLE" in the string to constant array and/or unpress the "Enable Watchdog w/Reset button"

The former is correct. To turn off the watchdog, you want to use iotype LJ_ioSWDT_CONFIG with special channel LJ_chSWDT_DISABLE.


1)What I meant by U6 blocked is the situation I have made this post for : Labjack Error #1008 : Communication error failure occured at LJUD_OpenLabjackS.vi". Only the yellow LED of the Labjack is on, the green is off.

2)Is the program in the print screen correct in order to disable the wathdog? (LJ_chSWDT_DISABLE and False button)

All my U6 modules are used on another projects right now, I can't make the test ...

Thanks a lot,

User

Attached Thumbnails

  • Sans_titre.PNG


#8 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 05 March 2013 - 08:58 AM

1. I understand now ... by blocked you mean when the host has forgotten the U6 is there and can't talk to it. So if the U6 is blocked, then no matter what software is running the U6 will not get any communication. If the watchdog is set to reset after 20 seconds with no communication, then it will reset after 20 seconds after getting blocked. So the question is will the reset cause it to get unblocked? Will a reset cause the host to remember or notice that the U6 is actually there and start talking to it again? From our experience and testing, the answer is yes. 2. Yes, your VI looks correct. It think it would be more proper to pass TRUE (meaning "yes I want to disable", or disable=true), rather than FALSE, but I am pretty sure the value is ignored anyway. Rather than using AddS-Go-Get.vi, you could simplify by just using LJUD_eGetSS.vi.

#9 user1979

user1979
  • Members
  • 62 posts

Posted 06 March 2013 - 01:40 AM

Hi, I have been running the attached program from the 4th of march (09:50 am) to the 6th of march (3:40 am). At 3:40 am I started getting the same error that the one I have created this post for. The only difference between the attached program and the one that has been running is that it wasn't including the turn off of the watchdog. At the moment the yellow LED of the Labjack is turned on and the green one is off. Closing the watchdog and/or running the "simple watchdo Vi" doesn't change anything and I get the message : Labjack error #10007 : Labjack not found occured at LJUD_opendLabjackS.vi" Do you see anything wrong in my program? Thanks a lot, User PS : I have been running the 2011 version

Attached Files



#10 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 06 March 2013 - 07:52 AM

Test to make sure the watchdog is working as expected. So with your program working properly, pause the VI, and then see if after the timeout period you have specified you see the U6 reset. After the U6 resets, unpause your VI. You will likely get some sort of error because the VI thinks the device is streaming, but it has just reset so it is not streaming. See if you can get things going again without power-cycling the U6.



We only have LabVIEW 7, so can't open your VI.

- Does the problem occur if you run with nothing connected to the U6 except USB? This test helps us determine if the problem is some sort of electrical transient coming in on your I/O wires, and causing the host to forget the U6 is there.

- Does the problem occur if you use the executable LJStreamUD.exe V1.12 (labjack.com/support/ud/ud-setup) rather than your VI? This test helps us determine if it is something about your VI that is causing a problem with Windows or the UD driver.


To acquire AIN0, AIN1, Timer0, and Timer1 with LJStreamUD, you should:

- Use "config defaults" in LJControlPanel to configure the timers. Click "write values" and then exit LJCP and power-cycle the U6.

- In LJStreamUD set numchannels=6 and use positive channels 0, 1, 200, 224, 201, 224. All negative channels can be 199. Since that is 6 channels, the max scanrate will be a little over 8 kscans/second.

http://labjack.com/s...ers-guide/3.2.1

#11 user1979

user1979
  • Members
  • 62 posts

Posted 18 March 2013 - 03:34 AM

Hello, I have made some new tests ant it seems that your first suggestion could be correct ("some sort of electrical transient"). On a another computer, with another U6 module and no sensors connected, I have run the program for roughly 4 days without having any problems (11/03 to 15/03). I then connected the sensors and after less than 2 days I get "N/A" for the four measures (which is why I created this post for). I am not able to save my program in 7.0 version but I have made some print screens. I have been running the LJStreamUD on another computer with another labjack, with no sensors and nothing is blocked yet (started running at the same as above). This morning I have connected the four sensors to this labjack while LJStreamUD is running to see if anything happens. Do you have an idea what I could try? Conerning this "Test to make sure the watchdog is working as expected. So with your program working properly, pause the VI, and then see if after the timeout period you have specified you see the U6 reset. After the U6 resets, unpause your VI. You will likely get some sort of error because the VI thinks the device is streaming, but it has just reset so it is not streaming. See if you can get things going again without power-cycling the U6." : When I pause teh VI and start it back the values are correct. As you can see in my program I am opening and closing he U6 each time I make a measure. Thanks, User

Attached Thumbnails

  • 1.PNG
  • 2.PNG
  • 3.PNG
  • 4.PNG
  • 5.PNG
  • 6.PNG
  • Forum1.PNG


#12 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 18 March 2013 - 07:53 AM

I see now that you are not streaming all the time. Rather, your LabVIEW program uses sequences to force various things to happen in order:

0: Open U6. Enable watchdog to reset U6 after 20s timeout.
1.0: Open U6. Configure 2 timers as PWM16 and DutyCycle. Wait 1000ms. Read DutyCycle.
1.1: Configure 2 timers as PWM16 and DutyCycle. Wait 1000ms. Read DutyCycle. PinConfigReset.
1.2: EasyStreamStart (includes open). Read 1 second of stream data. EasyStreamStop.
1.3: Write data to file.
2: OpenAny. Disable watchdog.

When the program occurs, what is your program doing? Is your program executing all the frames, but they are all giving errors? Or is it stuck on one frame? Or are some frames working and only some giving errors?

When the program occurs, if you close your program do you see the U6 reset after 20 seconds?

Test whether your program can recover from reset: While your program is running, unplug/replug USB to the U6. You will get some errors, but once the U6 reboots your program should start running normally. Try doing the unplug/replug at various different spots in your program to see how robust your program is.

Test whether the watchdog is working: Pause your program at various spots. Wait 20 seconds, watching the LEDs on the U6, and see if it resets automatically due to the watchdog. A few seconds after reset, once the U6 has properly reenumerated, unpause your program and see if it runs normally.

#13 user1979

user1979
  • Members
  • 62 posts

Posted 19 March 2013 - 03:45 AM

When I tried to do your tests I realised that the turn off of the watch dog doesn't work. When I set the turning on of the watchdog at 7secs with my program and then stop it, and just run the screenshot VI once or several times, the green LED keeps blinking every 7 secs. I guess that means the watchdog is working but not the turning off. Do you know what is wrong in the screen shot program? Thanks, User PS : setting the boolean to T or F doesn't change anything

Attached Thumbnails

  • Sans_titre.PNG


#14 user1979

user1979
  • Members
  • 62 posts

Posted 19 March 2013 - 04:16 AM

I have turned off the computer and unplugged the U6. Once the computer is on again and U6 connected the green LED keeps blinking every 7 secs. This doesn't happen when I replace it by anotherU6 (never been used). The green light stays green (I haven't run any program with this U6)

#15 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 19 March 2013 - 09:31 AM

I see the same problem testing with U6 firmware 1.38 and the example VI "Watchdog Extended.vi". I can change the timeout, but can't disable the watchdog. We will follow up with a fix.

#16 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 19 March 2013 - 03:48 PM

I have turned off the computer and unplugged the U6. Once the computer is on again and U6 connected the green LED keeps blinking every 7 secs. This doesn't happen when I replace it by anotherU6 (never been used). The green light stays green (I haven't run any program with this U6)


It looks like there were some driver issues causing this. I've fixed them and uploaded new dlls here: http://labjack.com/s...bJackUDv334.zip

If you have a 64-bit version of windows, place the 32-bit .dll into the C:\windows\SysWOW64 folder. If you have a 32-bit version, place it into the C:\windows\system32 folder. You can ignore the 64-bit version of the .dll.

This should allow the watchdog to disable properly. We tested it with the "Watchdog Extended.vi" sample.

#17 user1979

user1979
  • Members
  • 62 posts

Posted 20 March 2013 - 12:57 AM

Hello, The link leeds to "page not found". Will wait for a new link. Thanks User

#18 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 20 March 2013 - 11:08 AM

Hello,

The link leeds to "page not found". Will wait for a new link.

Thanks

User


Sorry about that! It looks like the server didn't save the link after the file was uploaded. It's all fixed now and the link should work.

#19 user1979

user1979
  • Members
  • 62 posts

Posted 26 March 2013 - 02:47 AM

Hello,

Thanks for the dll. I have changed it and then run the tests that you recommanded me to do. By the way, this change makes the Stop of the Watch dog work fine now. Please find the results below :

When the program occurs, what is your program doing? Is your program executing all the frames, but they are all giving errors? Or is it stuck on one frame? Or are some frames working and only some giving errors?

When the problem occurs, the program executes every frame, but I get an error for each measure :

Sequence 0 : error 7008
Sequence 1 : error 7008
Sequence 2 : error 7008
Sequence 3 (writing to file) : no error

While the program is running with the problem, the LED never blinks (set to 20 secs) although the program started with the Extented Watchdog launched once at the beginning of the program (with you new DLL)


When the program occurs, if you close your program do you see the U6 reset after 20 seconds?

No it doesn’t. In order to have the LED blinking again I need to unplug the U6, and then it works fine.

Test whether your program can recover from reset: While your program is running, unplug/replug USB to the U6. You will get some errors, but once the U6 reboots your program should start running normally. Try doing the unplug/replug at various different spots in your program to see how robust your program is.

Roughly 4 times out of 15 or 20 tests the window of the program freezes and I have to use Ctrl Alt Del to close Labview. Wether the program freezes or not the LED blinking occurs but has no effect.

Test whether the watchdog is working: Pause your program at various spots. Wait 20 seconds, watching the LEDs on the U6, and see if it resets automatically due to the watchdog. A few seconds after reset, once the U6 has properly reenumerated, unpause your program and see if it runs normally.

The program recovered from the pause each time and was able to make the measures.

#20 user1979

user1979
  • Members
  • 62 posts

Posted 26 March 2013 - 03:20 AM

I forgot to say I had made another test at the same time : Both PWM signals (no AI connected) connected to another labjack running on another computer with the same program but without the AI program part and the problem occured after a few days too. Since I had also run the program (pwm+AI parts) without connecting any signals without any problems after 4-5 days (the problem occurs after 3 days max) perhaps the problem comes from the PWM signals.

#21 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 27 March 2013 - 09:17 AM

What operating system are you running?


So if you pause the program when the U6 is working fine, you see the U6 reset every 20s because of the watchdog, but when the problem occurs the U6 does not reset. Even if you close all software, the U6 still does not reset. Not sure what is going on here. Could software still be talking to the U6, or perhaps the watchdog is getting disabled somehow? Does it make a difference if you remove the enable/disable watchdog from your program, and instead use "config defaults" in LJControlPanel to enable the watchdog and leave it enabled all the time?


In addition to using the watchdog to try and for the USB host to recover, we can try to add something to the signals to prevent the problem from occurring in the first place. A first simple thing to try is putting a resistor in series. So connect the signal to a resistor and connect the other side of that resistor to the U6. You can use a resistor up to 22k:

http://labjack.com/s...s-guide/2.8.1.1

The next step would be to add a capacitor to form a low-pass RC filter. What is the frequency of your PWM?

Further steps would be to add a TVS diode on either or both ends of the cable, or to put an opto-coupler in series to provide isolation between the signal and U6.


I forgot to say I had made another test at the same time :

Both PWM signals (no AI connected) connected to another labjack running on another computer with the same program but without the AI program part and the problem occured after a few days too. Since I had also run the program (pwm+AI parts) without connecting any signals without any problems after 4-5 days (the problem occurs after 3 days max) perhaps the problem comes from the PWM signals.

Can you do this test, but without enabling the timers on the U6 at all. Perhaps just run LJLogUD, rather than your software.

#22 user1979

user1979
  • Members
  • 62 posts

Posted 27 March 2013 - 09:53 AM

When I run my progam without both timers set to true for each PWM signal the measure doesn't work. I have tried all of the combinations, both need to be set to true. Shall I run LJLogUD just as it when it opens up? with the default values? User

#23 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 27 March 2013 - 03:49 PM

Yes, just run LJLogUD with the default settings. I understand it will not be reading the duty-cycle measurement, but that is what I want to test. We are trying to isolate whether some sort of electrical transient is hitting the U6 through the PWM signals, or whether the actual process of making the PWM measurement is causing some sort of problem. Before running LJLogUD, go into "config defaults" in LJControlPanel and make sure the power-up default is that 0 timers are enabled. Then power-cycle the U6 so that we know the duty-cycle input timers are not enabled. We want to have the PWM signals connected, but don't want the U6 to actually be measuring the duty-cycle. Another thing to try. When the problem occurs, close all software, go to Windows Device Manager, and find the USB entry for the U6. Right-click and "Disable", then right-click and "Enable". If that brings it back, it is a likely sign that the device was fine but the USB host had indeed suffered a problem. What operating system are you using? Same on both machines you tested?

#24 user1979

user1979
  • Members
  • 62 posts

Posted 03 April 2013 - 05:31 AM

Hello, here are the results of the tests : Yes, just run LJLogUD with the default settings. I understand it will not be reading the duty-cycle measurement, but that is what I want to test. We are trying to isolate whether some sort of electrical transient is hitting the U6 through the PWM signals, or whether the actual process of making the PWM measurement is causing some sort of problem. Before running LJLogUD, go into "config defaults" in LJControlPanel and make sure the power-up default is that 0 timers are enabled. Then power-cycle the U6 so that we know the duty-cycle input timers are not enabled. We want to have the PWM signals connected, but don't want the U6 to actually be measuring the duty-cycle. =============> I have been running the LJLogUD for 4 days without having any error. Both AI and PWM signals were conected to the Labjack. Another thing to try. When the problem occurs, close all software, go to Windows Device Manager, and find the USB entry for the U6. Right-click and "Disable", then right-click and "Enable". If that brings it back, it is a likely sign that the device was fine but the USB host had indeed suffered a problem. =============> I have run my program with only the 2 PWM signals connected and the PWM part of the program running. Got the error after 1 day. I disabled the USB entry but can't enable it back (I have attached a print screen : Code 10) What operating system are you using? Same on both machines you tested? =============> All my tests have been done using Window XP on all computers I have leaving the Labjack connected as it is in case you have another test you want me to do to unblock it. Thanks User

Attached Thumbnails

  • Forum.PNG


#25 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 03 April 2013 - 08:07 AM

So you did the test where LJLogUD was running. You have all the signals connected, including PWM, but the U6 is not actually doing the PWM measurement. With this test, you have no problems.

It is sounding like you don't have the classic transient problem. Rather it seems like your PWM signals do something that causes a problem with the PWM measurement feature of the U6. When that happens the green LED turns off and even the watchdog does not work. Very unusual and a problem we have never seen before, thus the complicated troubleshooting you have had to go through.

We will do some tests to see if we can recreate the problem. What can you tell us about your 2 PWM signals? Voltage levels? Frequencies? Typical max/min duty-cycle?

What firmware version are you running? We will test with V1.38:

http://labjack.com/s...irmware/u6/beta


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users