Interruption of signal and error code | LabJack
 

Interruption of signal and error code

6 posts / 0 new
Last post
Buwski
Buwski's picture
Interruption of signal and error code

Hi!

I'm trying to use the T7 Labjack to read a frequency signal coming from a transducer device (that gives a frequency signal), and it's read using a FIO port. The stream read operation is activated by a python script (i followed the examples given). The problem is that the read operation is interrupted once there is a signal coming. When the interruption happens the stream stops and there is the following error:

Exception in thread Thread-1:

Traceback (most recent call last):

  File "C:\Anaconda2\lib\threading.py", line 801, in __bootstrap_inner

    self.run()

  File "C:\Anaconda2\lib\threading.py", line 754, in run

    self.__target(*self.__args, **self.__kwargs)

  File "T40B_single.py", line 82, in run

    ret=ljm.eStreamRead(handle)

  File "C:\Anaconda2\lib\site-packages\labjack\ljm\ljm.py", line 1140, in eStreamRead

    raise LJMError(error)

LJMError: LJM library error code 1264 LJME_INCORRECT_NUM_RESPONSE_BYTES_RECEIVED

How can i resolve this error? What is the possible explanation for this problem? Thanks

LabJack Support
labjack support's picture
So are you saying you set up

So are you saying you set up and start the stream just fine.  As long as the signal on FIO0 is not changing the stream runs fine and your calls to eStreamRead do not give any errors.  But as soon as you get one pulse on FIO0 your next call to eStreamRead give error 1264 LJME_INCORRECT_NUM_RESPONSE_BYTES_RECEIVED?

Does either LED do anything unusual when the pulse happens?

What if instead of your signal you take a jumper wire connected to ground at tap that inside FIO0?  Try to just do it once without causing any bounce.

Buwski
Buwski's picture
The LEDs during the normal

The LEDs during the normal data acquisition:

-COMM blinks for a while, then stops (goes to OFF) and then returns to ON

-STATUS blinks only for a while and then stays turned on

I took a jumper signal and i linked the FIO to the ground, there isn't any interruption (T7 is not damaged)

I'l try to give a better explanation: the signal coming from a sensor is a squarewave, affected by a certain noise (the picture is taken from an oscilloscope, the signal is a 3.3 V squarewave, with a frequency of approximately 60 kHz), and when the script is running and also the data stream is coming, this error comes out. I use this reading on the FIO1, while on FIO0 i make another stream with the same function but for another signal but for this case there isn't any interruption.

I also tried to use instead of the stream mode the simple read mode and it works correctly (see below):

value_w_ticks = ljm.eReadName(handle, "DIO1_EF_READ_A")

value_w_freq = ljm.eReadName(handle, "DIO1_EF_READ_B_F")

If there is something not clear, just tell me.

LabJack Support
labjack support's picture
The LEDs during the normal

The LEDs during the normal data acquisition:
-COMM blinks for a while, then stops (goes to OFF) and then returns to ON
-STATUS blinks only for a while and then stays turned on

That sounds like the LED sequence seen during power-up (or reboot) with a USB connection.  I would not expect that during normal operation as that would indicate the device is rebooting.

Normal LED activity during stream mode is that COMM is steady on (will blink if you are sending any commands to the T7) and STATUS LED is blinking steadily (10 Hz typical).

Buwski
Buwski's picture
I tried to improve the

I tried to improve the disturbances and noise situation: the Labjack worked properly. In conclusion i simply put a Low-pass filter before the board and the Error disappeared. It was an affection by high input signal.

Buwski
Buwski's picture
Sorry, my error:

Sorry, my error:

*high frequeny disturbances