
communication error 1008
#1
Posted 17 July 2012 - 07:03 AM
#2
Posted 17 July 2012 - 08:20 AM
http://labjack.com/s...cation-failures
... but yours seems different. Is your RS232 port from a USB to RS232 converter?
If you make the serial calls with nothing connected to the serial port, does that still cause the problem?
#3
Posted 17 July 2012 - 10:42 AM
We have an app note about communication problems:
http://labjack.com/s...cation-failures
... but yours seems different. Is your RS232 port from a USB to RS232 converter?
If you make the serial calls with nothing connected to the serial port, does that still cause the problem?
No I think problem is our COM device. The other COM device is a pressuring system. For some reason, whenever it emits gas, the labjack loses USB connection. Interesting thing is that after losing USB connection, the first statement in following code runs OK but the second statement with LJ_ioPIN_CONFIGURATION_RESET produces "Communication failure". I just want to recover from the disconnection more nicely. Is there any way to refresh current USB connection with code?
[Error ljHandle] = ljud_OpenLabJack(LJ_dtU3,LJ_ctUSB,'1',1);
Error_Message(Error)
Error = ljud_ePut(ljHandle, LJ_ioPIN_CONFIGURATION_RESET, 0, 0, 0);
Error_Message(Error)
#4
Posted 17 July 2012 - 11:35 AM
#5
Posted 17 July 2012 - 01:33 PM
#6
Posted 17 July 2012 - 03:02 PM
#7
Posted 17 July 2012 - 03:09 PM
#8
Posted 17 July 2012 - 05:09 PM
So even with nothing connected except USB, you see:
- Sending RS232 commands without gas device connected causes no problem with U3.
- Sending RS232 commands with gas device connected causes USB problems on the U3 port.
Yup. That's exactly what's happening.
#9
Posted 17 July 2012 - 05:15 PM
There currently isn't an easy way to reset the USB port in that way. The closest option might be to consider using the watchdog timer.
It's strange for it to die like that. Have you tried using a powered hub?
I appreciate your patient answers so far.
I really hoped that there is a way first to remember USB port connected to LabJack device and then to refresh the connection when the disconnection happens.
My options are currently bottomed out. Can you tell me how I can get and use the watchdog timer? Thanks
#10
Posted 18 July 2012 - 09:43 AM
There is no way to tell Windows to reset the port and notice that the U3 is still fine.
Usually this happens because a transient comes in on some I/O connection or GND or VS, and travels through the U3 to the USB port. The U3 can handle it, but the USB port cannot. You are seeing it happen with no connections/wires except for USB, though, so that is strange. What if you physically move the U3 and USB cable away from the gas device and perhaps connect to a different USB port? What if you try a hub or a different hub (all hubs should have their own power-supply, not get power from the USB cable)?
Perhaps try the $38 isolator mentioned near the end of this page:
http://labjack.com/s...s/usb-via-other
The U3 itself can notice that there is no communication, and reset itself, and that might cause the USB port to notice that it is there. Use the watchdog for that. You can enable the watchdog using the "config defaults" section in LJControlPanel, but it is better to add code to your program to enable it at the beginning and disable it on exit:
http://labjack.com/s...rs-guide/4.3.13
#11
Posted 18 July 2012 - 01:51 PM
There currently isn't an easy way to reset the USB port in that way. The closest option might be to consider using the watchdog timer.
It's strange for it to die like that. Have you tried using a powered hub?
Good news. We tried a powered hub and it worked like a charm. Thanks a lot for your help to give us the solution.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users