Hi,
Im using LJ T7 (USB) on linux Debian 10.x i386 and reading 1CH (AIN0) with 96kHz in Python. Randomly i get out errors on function eStreamRead: LJM library error code 1263 LJME_NO_RESPONSE_BYTES_RECEIVED and i dont know why. It happens the same if reduce sampling frequency to 48 kHz. Im using all the latest drivers: LJM_2020_03_30_i386 and Python_LJM_2020_11_20 and latest firmware.
Here are my settings/code:
handle = ljm.open(ljm.constants.dtT7, ljm.constants.ctUSB, "ANY")
noCHN = 1
aScanList = ljm.namesToAddresses(noCHN, CHN)[0]
aNames = ["AIN_ALL_NEGATIVE_CH", "AIN_ALL_RANGE", "STREAM_SETTLING_US",
"STREAM_RESOLUTION_INDEX"]
aValues = [ljm.constants.GND, 1, 0, 0]
ljm_err = ljm.eWriteNames(handle, len(aNames), aNames, aValues)
N = 48000
FS = ljm.eStreamStart(handle, N, noCHN, aScanList, FS)
...
while :
RawData = ljm.eStreamRead(handle)
Ive also added log file from debuggin mode
Please help.
I would first recommend you upgrade firmware to the most current release version (1.0292). This can be done using the device updater tab in Kipling.
I would also recommend you run our basic stream example as a starting point. This will help verify whether there is an issue in software. Does the stream_basic example run without error? Do other examples run without error?
https://github.com/labjack/labjack-ljm-python/blob/master/Examples/More/...
It seems to be working after firmware uprgrade, thank you.
Another question, if i want to measure also temperature + AIN0, do i also need to measure aditional 3rd channel to solve influences between channels, like it is if you measure AIN0 and AIN1?
Could you please rephrase the question? What sensors do you need to take readings from?
There should not be any notable cross-talk between channels.
We added IEPE Microphone with suitable preamplifier on AIN0. If we add normal Analog sensor to AIN1, there is noticeable cross-talk present. Till now, we were solving this by reading 3rd channel, to neutralize cross-talk. It works, but the problem is if we read 3 channels, we must lower sampling rate. We also tested this with Labjack U6 and it is the same.
Update on first problem: “LJM library error code 1263 LJME_NO_RESPONSE_BYTES_RECEIVED” is happening again. It worked for half of day and now its back. Once there was also error: “LJM library error code 1280 LJME_PROTOCOL_ID_ERR”. These errors are not present on U6, but there we use C instead of python.
I would not suspect the issue with the microphone you are seeing is crosstalk, strictly speaking. There should not be significant crosstalk (coupling) between AIN channels. To test this, you could connect AIN0 to GND and leave AIN1 connected. When running your program, you should see that AIN0 is not affected by AIN1.
The issue is likely due to a high source impedance (weakly driven) microphone signal that is causing dynamic switching errors at the device mulitiplexers. Providing greater settling time for the channel may help reduce the errors you are seeing. Table 2 on the following page has our recommendations for changing channel settling time according to source impedance. There are also some settling tests further down the page that I would recommend trying to help verify whether this is the issue:
http://labjack.com/support/app-notes/SettlingTime#SettlingTime
The LJME_NO_RESPONSE_BYTES_RECEIVED error should indicate that some USB timeout is occurring. You could increase the stream timeout, and that might help, but it could be ignoring a bigger issue with the USB connection. I would recommend trying different USB cables, ports, perhaps a different computer, and maybe also try switching to an Ethernet connection type for the program.
The following page describes the relevant stream timeout configurations:
https://labjack.com/support/software/api/ljm/constants/ljmstreamreceivet...
Thank you.
I will try to play around with settling time to solve the problem with cross-talk.
Ive already tried to set-up LJM_STREAM_RECEIVE_TIMEOUT_MODE to MANUAL, but then i got out errors. Probably because im using some other digital channels for reading the inputs. Is it possible to set-up timeout mode just for AIN channels?
First we will try to change USB cable and we will see what will happen. I will let you know.
There is only the singular LJM_STREAM_RECEIVE_TIMEOUT_MS parameter. The timeout indicates you are not getting any data from the device within the timeout period. Stream data is returned channel interleaved with a scan containing a sample from each channel in the scanlist, a stream packet will always contain at least one scan, so what channels you have in the scanlist (and in what order) does not make a difference.