GQ Electronics Technical Support Forum Active Users: / Visits Today:
Highest Active Users:
GQ Electronics Technical Support Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 GQ Electronics Forums
 2.GQ Geiger Muller Counter
 GMC history download in octave
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Erwin55

Germany
41 Posts

Posted - 05/17/2018 :  01:00:57  Show Profile  Reply with Quote
Dear All,

maybe a stupid question, does the following command
<SPIR[00][00][00][10][00]>>
initializes the GMC-300e+ to send 4096 Bytes, starting from memory position 0?

Has anyone in this forum some experience in downloading from GMC-counter to octave (Pkg instrument-control-0.2.3 installed and working perfect)? If yes, why do I get only 255s in the data-vector, when applying the following commands?

srl_write(s1,"<SPIR[00][00][00][10][00]>>");
data = srl_read(s1,4096);

Thanks and I appreciate any kind of small piece of advices

Alex (aka Erwin55)
Reply #1

Erwin55

Germany
41 Posts

Posted - 05/17/2018 :  05:07:59  Show Profile  Reply with Quote
I performed a configuration dump. The result is disturbing me:
11111111-> 38 CFG_SPI_DataSaveAddress2
11111111-> 39 CFG_SPI_DataSaveAddress1
11111111-> 40 CFG_SPI_DataSaveAddress0
11111111-> 41 CFG_SPI_DataReadAddress2
11111111-> 42 CFG_SPI_DataReadAddress1
11111111-> 43 CFG_SPI_DataReadAddress0

Can someone explaint it to me?
Go to Top of Page
Reply #2

ullix

Germany
1171 Posts

Posted - 05/17/2018 :  05:31:18  Show Profile  Reply with Quote
Welcome to the GQ World of firmware bugs!

And you do realize: after the download some heavy parsing is required?

It is all incorporate in GeigerLog, which is Open Source and available here: https://sourceforge.net/projects/geigerlog/
The manual to GeigerLog has an in-depth discussion of all the bugs and intricacies relevant for your counter. Reserve some time !

I am not quite sure what octave is. At the end you might be better off by downloading via GeigerLog and continue using the GeigerLog-produced History and Log files.
Go to Top of Page
Reply #3

Erwin55

Germany
41 Posts

Posted - 05/17/2018 :  07:05:24  Show Profile  Reply with Quote
Hello ullix,
and thanks for your quick response. Octave is a matlab-clone hosted at sourceforge.
To be honest, the parsing is not the problem I have. All commands are working fine in both directions. Only SPIR command is not working as I'm expecting. The transfer ist ok but I'm receiving only FFs. Independent from starting address and data size (<= 4096).
Currently I'm not looking for another program and to use the csv from the Data Viewer is my work arround, but to have a direct memory access to the measured data would be more efficient.
I'll take my time to look in your manual and also in the scripts supplied and cheers for any hint.
Go to Top of Page
Reply #4

EmfDev

2250 Posts

Posted - 05/17/2018 :  10:18:27  Show Profile  Reply with Quote
@Erwin, those CFG_SPI_DataReadAddress0..etc are no longer used so you don't need to worry about them.

For the SPIR, make sure the auto save on the device is ON every second mode to check if working.

And your command looks incorrect.
srl_write(s1,"<SPIR[00][00][00][10][00]>>");

The command should be "<SPIR" ==>> these are corrent in ascii but you can't write 0x00 in ascii cos it's NULL.

so one way is to send the full command as hex for example:

3c 53 50 49 52 00 00 00 10 00 3e 3e =>> these correspond to
< S P I R [00] [00] [00] [10] [00] > >

Go to Top of Page
Reply #5

Erwin55

Germany
41 Posts

Posted - 05/18/2018 :  01:45:38  Show Profile  Reply with Quote
Thanks @EmfDev. Your advice gave me the right idea how to solve my problem. For the first time I got something else as 255s. I'll now validate the results and if anything is ok I'll come back with the octave/matlab-code. Maybe it helps another user.
Go to Top of Page
Reply #6

Erwin55

Germany
41 Posts

Posted - 05/18/2018 :  03:38:07  Show Profile  Reply with Quote
A thank you again @EmfDev. It took me one day playing arroung with the serial port only to get data nonsens and 15 minutes to solve the problem after your advice. Simply said: I changed the string to uint8, that's it.

I'll post a sample file in the next reply, if anyone is needing it, he will be lucky.
Go to Top of Page
Reply #7

Erwin55

Germany
41 Posts

Posted - 05/18/2018 :  03:53:43  Show Profile  Reply with Quote
I have a little problem with inserting the octave code in this forum. Hence I put it here:

h**p://www.gomatlab.de/gq-gmc-300eund-geigerzaehler-serielle-schnittstelle-auslesen-t46066.html
Go to Top of Page
Reply #8

EmfDev

2250 Posts

Posted - 05/18/2018 :  08:52:14  Show Profile  Reply with Quote
That's cool. No problem and I'm very glad it helped.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
GQ Electronics Technical Support Forum © Copyright since 2011 Go To Top Of Page
Generated in 0.08 sec. Snitz's Forums 2000