I'm using the labjack in streaming mode via python, streaming 5 ain ports. When I tried by USB, I could only ever get 15 seconds of data (nearly precisely) before it threw error 1279. I've got it hooked up to ethernet now, and it goes for much longer (about 5 mins), but eventually still throws error 1279. Any ideas what I could do to avoid that error? Here's the code I'm running as a minimal example:
import sys
import time
from labjack import ljm
all_ain = ['AIN0','AIN1','AIN2','AIN3','AIN4']
adc_res = 0 #0: fastest
adc_rate = 100000/len(all_ain) #asks adc to go full-speed given the # of ains
secs_per_read = .1 #how frequently eStreamRead will yield values
handle = ljm.open(ljm.constants.dtT7, ljm.constants.ctETHERNET, "ANY")
scansPerRead = int(adc_rate*secs_per_read)
ljm.eWriteName(handle, 'AIN_ALL_RANGE', 10)
ljm.eWriteName(handle, 'STREAM_SETTLING_US', 0)
ljm.eWriteName(handle, 'STREAM_RESOLUTION_INDEX', adc_res)
ain_addresses = ljm.namesToAddresses(len(all_ain),all_ain)[0]
adc_rate = ljm.eStreamStart(handle, scansPerRead, len(all_ain), ain_addresses, adc_rate)
stream_start_time = time.time()
print("Stream started at "+str(adc_rate)+"Hz")
while True:
#read from device
try:
vals,device_backlog,ljm_backlog = ljm.eStreamRead(handle)
except Exception as e:
print(e)
print(time.time()-stream_start_time)
ljm.close(handle)
sys.exit()
LJM 1.1804 should fix this. Please update to the current beta software:
https://labjack.com/support/software/installers/ljm
Updating to the beta (1.1804) of LJM solved this, thanks!