Comments (11)
Seems to be good for rates from 1 to 822 Hz (haven't checked exhaustively), then bad for the following (inclusive) ranges:
1025 - 1041
1050 - 1066
1075 - 1092
1100 - 1117
1125 - 1144
1150 - 1168
1175 - 1195
1200 - 1219
The pack error is only ever on the first retrieval from the streamData generator after its construction; subsequent next
calls work fine, i.e.:
stream = streamData()
next(stream) # fails with pack error
next(stream) # no error
...
next(stream) # no error
stream = streamData()
next(stream) # fails with pack error
next(stream) # no error
...
from labjackpython.
I haven't been able to reproduce the struct.error on Windows, Linux or Mac.
What operating system and its version are you using?
What firmware version is on your U6 (check with the configU6 method)?
If you power cycle your U6 and run your code, does it have the same issue?
from labjackpython.
Firmware v 1.39.
Same problem under Manjaro & arch, on different machines.
I'll try a firmware update and report back.
from labjackpython.
I still see the issue with the latest firmware, 1.45
Linux kernel: 4.19.69
python: 3.7.4
HardwareVersion
: 2.0.0
LabJackPython.GetDriverVersion()
: 2.0600.
from labjackpython.
#111 is a one-line change that prevents the error, and the data looks good - if I configure FIO0 as a frequency output and sample it, I see no discontinuities or spurious points.
from labjackpython.
#111 is a one-line change that prevents the error, and the data looks good
PR #111 looks similar to #106, which was previously rejected because the author did not respond to requests for more information. Thankfully @mickp has been very active on this ticket so hopefully the issue can be troubleshot and resolved this time around.
from labjackpython.
Yeah - #106 is the same behaviour change, to address the same issue. I've been unable to figure out the underlying cause (why are too few bytes being read?), but the workaround delivers what I believe to be the expected behaviour.
from labjackpython.
Thanks for the additional information. I'll see if I can reproduce your issue before accepting your commit.
As for the too few bytes being read, that would occur with the 1 second USB timeout and all requested data not being available. Responses come in 64-byte packets, so with your error the last packet wasn't available within the timeout period. Likely with a small delay after the stream start you wouldn't get the error.
from labjackpython.
@mickp , I made a commit to help prevent the partial stream read packets. Please try out the latest LabJackPython here on GitHub and let me know if this resolves your issue or not.
I didn't use your pull request's solution as I wanted to prevent the partial reads, and that error lets me know when stream code relating to read sizes needs fixing/tweaking.
from labjackpython.
Yep - that fixes things here.
from labjackpython.
Thanks. I'm going to close this out.
from labjackpython.
Related Issues (20)
- liblabjackusb.so: undefined symbol: DigitalIO HOT 1
- reading zero values HOT 4
- Why does labjackpython package still enforce python=2.7? HOT 3
- NullHandleException() condition: None < int is syntax error HOT 2
- No examples for U12? HOT 3
- I2C: not possible to wait for ACK HOT 3
- close() method does not release the device on Windows 10 HOT 3
- Output frequency on u3 HOT 1
- LabJack T7 Support HOT 3
- Some assistance needed with u3 and SPI HOT 1
- handling multiple labjacks on the same computer HOT 3
- Labjack U6 set dutycyle PWM16 HOT 2
- _openWirelessBridgeOnWindows() uses undefined names deviceType and handleOnly HOT 1
- i2c response handling differs on u6.py only HOT 1
- UE9.streamData() uses undefined name retResult HOT 1
- Index Error HOT 5
- Better packaging HOT 12
- Unable to find "labjackud" when running from Cygwin HOT 1
- SIGALRM in outputSinDac.py not found HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from labjackpython.