07-20-2024 10:56 PM
@ku_ku wrote:
Hi Santo,
I'm glad to share it 🙂
SpectrumCompact (J0SSAP74)
Hope you can see there something I do not see 🙂
Tim (@crossrulz) has already provided all the right guidance.
Looks like the manufacturer did not make the instrument's API "automation" friendly, typical SCPI commands are very automation friendly as it doesn't treat the computer as an extended display (i.e., terminal) to the instrument.
What I observe is that whenever the instrument sends "->" it is expecting the computer to send a command or query something, all other time it is sending some data. So, you need a state machine like architecture, where it looks for the "->" output from the instrument and only then it can command/query something.
07-21-2024 09:06 AM
Thank you for your help!
Got more questions than in the beginning... but I have more or less VI tool that can log Spectrum Compact measurements once in minute.
I'll share basic .vi that can read 39-40GHz spectrum. There are still lot of to tune and optimize.
One thing I don't like now, is reading data- line by line (LF delimiter), in stead of all data in one set or two-three sets(CR delimiter). If read line by line there is more than 4002 lines to read. Time delay 1ms is quite on the edge. If data is not read and next sweep has been started, then "communication hangs".
Lot of to do, but for sure, it will help me to work in field. Log measurements for 24h, without sitting down and pressing the buttons on instrument.
07-22-2024 03:07 AM
How to convert sring of "hexadecimal unsigned byte strings consisting of 2 characters" delimited by LF to ASCII delimited by LF? Can not figure it out.
This is in hex code
transform it to string (decimal number)
101
101
100
102
I can do it line by line, if I read an instrument line by line. But instrument spits out 4001 line in one string... no ideas 🙂
07-22-2024 05:10 AM
Got the answer... still it is not string with ASCII decimal numbers at the output, but I can deal with array... or convert to string :D:D:D