Comments (18)
Right now JVisa does not have a method to parse a binary block. I think it is easy, I will add it.
Documentation in this discussion: #10 (comment)
Links to PyVisa functions:
from jvisa.
We look forward to your upgrade of the JVisa library
from jvisa.
Please post a sample of the data you want to parse. You can use the VISA Test Panel in NI-MAX. I only need to see the beginning of the bytes.
For example, a screenshot from dist:data?
on a Rigol oscilloscope returns
#9001152054BM6\94\11\00\00\00\00\006\00\00\00(\00\00\00\s\03\00...
from jvisa.
The following is the data
1: Write Operation (:WAVeform:DATA?)
Return Count: 15 bytes
2: Read Operation
Return Count: 1024 bytes
#800488251\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80\80
80\80\80\80\80\80\80\80\80\80\80
from jvisa.
I added code on branch add-data-block. I can take a screenshot from my instrument:
byte[] bytes = instrument.queryBinaryBlock("display:data?");
Files.write(Paths.get("screenshot.bmp"), bytes);
Check the programming manual for your instrument about waveform:data?
. For the Rigol DS1000Z series oscilloscope, it says
Before reading the waveform data in the internal memory, you need to judge whether the waveform data can all be read at one time according to the memory depth of the oscilloscope and the maximum number of waveform points that can be read each time.
from jvisa.
When using the new method, such an error was reported, "in viRead(): VI_SUCCESS_MAX_CNT: The number of bytes read is equal to count (0x3FFF0006)"
from jvisa.
Below is the programming documentation for the instrument I am using.
from jvisa.
When this problem occurs, pyvisa handles it as follows:
from jvisa.
The VI_SUCCESS_MAX_CNT
status should be handled, see
and
from jvisa.
Sorry, I just copied part of the code, now after copying all the code, it can work, thank you
from jvisa.
The following is the return value obtained by sending the "waveform data?" command using PyVisa and JVisa, and why they are different. The first picture is the result of pyvisa, and the second picture is the result of JVisa.
from jvisa.
I think it is different signed vs unsigned interpretation of byte
primitive. Try this
for (int i = 0; i < bytes.length; i++) {
System.out.println(i + " = " + Byte.toUnsignedInt(bytes[i]));
}
from jvisa.
yes,thank you ,I get it
from jvisa.
Hi, if the queryBinaryBlock()
method works, can we close this issue?
from jvisa.
Yes, we can close this issue.
from jvisa.
Is it considered to publish the newly added part as an official version?
from jvisa.
Yes, I plan to make an official release with the newly added features
from jvisa.
Released in 2.0.0
from jvisa.
Related Issues (13)
- is using keysight visa stable? HOT 4
- How to find resources connected to another computer (not localhost)? HOT 6
- Does JVisa support communication with ASRL?::INSTR? HOT 12
- JVisa whether you can read and write 16-base data? HOT 6
- JVisa for Android HOT 1
- Does this library work on Linux? HOT 14
- Does this library work on MacOSX? HOT 23
- system error? return value problem HOT 3
- system error? return value problem HOT 1
- M1 Mac errors, please advise. HOT 4
- Timeout expired before operation completed HOT 18
- Visibility of `JVisaInstrument.readBytes(int bufferSize)` method
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 jvisa.