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
 Deleting the History of an GMC counter
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ullix

Germany
1177 Posts

Posted - 02/27/2022 :  05:04:07  Show Profile  Reply with Quote
@EmfDev:

I understand the latest firmware for 500 series counter allow to delete the history in the counter's memory with command "Erase Saved Data".

How is that command accessible via the usb-serial interface?

Can it be also applied to the 300 counters?
Reply #1

EmfDev

2260 Posts

Posted - 03/01/2022 :  18:01:02  Show Profile  Reply with Quote
You can try ECFG on both.
Go to Top of Page
Reply #2

ullix

Germany
1177 Posts

Posted - 03/02/2022 :  00:53:04  Show Profile  Reply with Quote
Thanks. But I tested <ECFG>> on both, and it works on neither!

It may depend on firmware?

What is the minimum firmware you need on the 300, 500, and 600 series?

Edited by - ullix on 03/02/2022 00:59:08
Go to Top of Page
Reply #3

ullix

Germany
1177 Posts

Posted - 03/02/2022 :  04:21:30  Show Profile  Reply with Quote
@EmfDev: Correct me if I am wrong, but the ECFG command seems to be the command to erase the config, NOT THE HISTORY memory.

I want to erase the History memory, the 64k or 1 MB memory for the 300, 500, resp, counter.
Go to Top of Page
Reply #4

the_mike

Switzerland
53 Posts

Posted - 03/02/2022 :  07:51:00  Show Profile  Reply with Quote
Figures - Erase Config - ECFG.

Tried some other commands on my 320plus that could do the trick, but none worked:
EDATA
EHIS
EHISTORY
ESAVEDDATA
ESD (erase saved data)

nothing happened...

With the ECFG I killed successfully the configuration of my 500! At least a factory reset cured a display-issue i had, but it seems I can't connect it with geigerlog anymore...
- - -
EDIT: btw the command just killed the config, the history was still readable. And two factory resets didn't cure the problem with the connection, while the 320 still works
- - -

(for obvious reasons i'll not check the ECFG on the 320plus until i was able to recover my 500


Edited by - the_mike on 03/02/2022 07:55:58
Go to Top of Page
Reply #5

EmfDev

2260 Posts

Posted - 03/02/2022 :  11:19:06  Show Profile  Reply with Quote
@ullix, I'm so sorry I misread your question. @the_mike try to fully reboot the device. Make sure the Baudrate is set to 115200.

You can try this.

1. SPISE[0xAA][0xAA][0xAA] this is a sector erase. each sector is 4KB.
e.g. 53 50 49 53 45 00 00 00 -> erase first sector

then

2. Need to set the SPI Save Address back to 0x000000. No need if device is off.
SetSPISA[0xAA][0xAA][0xAA] -> SPI save address.

If you want to erase the full storage must erase all the sectors.

Maybe it is better to do it when device is off so that timestamp will be saved during power on.
Go to Top of Page
Reply #6

ullix

Germany
1177 Posts

Posted - 03/03/2022 :  02:08:28  Show Profile  Reply with Quote
Thanks EmfDev, but it is not clear to me:
quote:
1. SPISE[0xAA][0xAA][0xAA] this is a sector erase. each sector is 4KB.
e.g. 53 50 49 53 45 00 00 00 -> erase first sector
The three [0xAA][0xAA][0xAA] bytes allow a number of 0xFFFFFF = 16+ Million. And each number stands for the address of a 4k sector? This means the counter can address a memory of 69 Giga-Byte? Doesn't look right.

quote:
2. Need to set the SPI Save Address back to 0x000000. No need if device is off.
SetSPISA[0xAA][0xAA][0xAA] -> SPI save address.
Is the command "SetSPISA" (with "et" from "Set" in low caps?) or is it perhaps only "SPISA"?

I am sure these commands were not there from the beginning - they surely are not present in your docu GQ-RFC1801 - so from which firmware onwards do these command exist?
- on a GMC-3XX counter
- on a GMC-5XX counter
- on a GMC-6XX counter

Suggestion for firmware update:
it would be nice if the counter could answer the question "Do you support command XYZ?".

Suggestion for hardware update:
The USB-To-Serial are convenient, but there omnipresence on the market makes it cumbersome to distinguish devices. I suggest to fill the USB config of the chip with info like iManufacturer= GQ Electronics, and iProduct=GMC-300E+ !

This makes it a lot easier to recognize the correct device.

Go to Top of Page
Reply #7

EmfDev

2260 Posts

Posted - 03/03/2022 :  11:24:52  Show Profile  Reply with Quote
Only 20bits from the 3bytes are used for 1MB memory storage.
Each sector is 4k so there are 100 sectors from 0x000000, 0x000FFF, 0x0001FFF, etc.

I think these were on the code long time ago as I do not remember adding them. SetSPISA is not all caps.

Suggestion 1, is good.
2. we have been planning on that.
Go to Top of Page
Reply #8

ullix

Germany
1177 Posts

Posted - 03/04/2022 :  08:50:07  Show Profile  Reply with Quote
I got the deletion part working, but setting the new start value does not work, always resulting in a timeout, even up 10sec.

I sent command b'<SetSPISA\x00\x00\x00>>', but also tried b'<SETSPISA\x00\x00\x00>>', and also b'<SPISA\x00\x00\x00>>'. Always timeouts. Then resulting in failures until the counter has written the next timetag.

With poweroff it works, but the counter is rather picky and insists on a >3sec waiting period, or the SPISE deletion would also timeout.

Can you please check this ***SPISA command?

Edit:
and on a 500+ all SPISE and *SPISA commands fail with Timeouts, powered or not!


Edited by - ullix on 03/04/2022 09:10:47
Go to Top of Page
Reply #9

EmfDev

2260 Posts

Posted - 03/04/2022 :  11:58:10  Show Profile  Reply with Quote
I just tried > on a 500+ and it works.
3C 53 65 74 53 50 49 53 41 00 00 00 3E 3E

Verify with >
Go to Top of Page
Reply #10

ullix

Germany
1177 Posts

Posted - 03/05/2022 :  07:51:24  Show Profile  Reply with Quote
What do you mean by ">" ?

I can get the SetSPISA to execute, but did you verify that it did what you expected?

I did some tests with my 300E+ and 500+ counter, and the results are confusing.

Leaving the counter power ON resulted in failures on both counters, whether I issued the SetSPISA command or not.

Reason was in all 4 cases that a timetag to the memory was not written. In the 300E+ case the counter did eventually write a timetag some >200sec later, but in the 500+ case it was not written at all (waiting >15 min). Again, same failure with or without SetSPISA!

Switching the power OFF during the erasure worked on the 500+ independent of whether I issued SetSPISA or not, but in the 300E+ case the SetSPISA was required, or timetag failure resulted again!

On the 500+ with 1MB memory, deleting a chunks of 4k takes approx 35 millisec! Thus deleting the whole memory takes 256 * 0.035s = >9 sec!

Suggestion for firmware update: make this a single command, so to avoid the overhead of having to go through 256 times!

And while we are at the serial: make it faster. 115200 baud is old; the CH340 supports up to 20Mbit/s, this chip won't be the limit.

Go to Top of Page
Reply #11

EmfDev

2260 Posts

Posted - 03/07/2022 :  16:46:05  Show Profile  Reply with Quote
Yes that is a good command to add. For now maybe you can try to get cfg, then factory reset, then write to cfg which will be faster.

To verify write address, the GetSPISA. Looks like putting the alligator brackets messed up my comments.
Go to Top of Page
Reply #12

ullix

Germany
1177 Posts

Posted - 03/09/2022 :  06:24:08  Show Profile  Reply with Quote
quote:
For now maybe you can try to get cfg, then factory reset, then write to cfg which will be faster.
@EmfDev, that sounded like a great idea, but at the end it was even a lot worse that the SPISE thing, both in speed and reliability.

Writing the config to the counter is a rather slow process, since - according to your documents - it needs to be done byte-by-byte. Writing a single byte to the config of a GMC500 takes 14 ms (21 ms for a GMC300). So, 512 bytes need 512 * 0.014 = 7.2 sec. Plus overhead makes it ~9 sec, just as much as the SPISE process takes.

But on top of this the config-writing is notoriously unreliable, often requiring 1, 2, or even 3 re-writes, before a read-back confirms the correct configuration finally made it to the counter.

And more, on top of this the ECFG command also has a tendency to timeout. Again, most of the time requiring multiple repeats.

Overall this Factory Reset based approach may easily result in 20 to 30 sec before it is finished!

The SPISE approach is anything but a speed champion, but at least is a lot more reliable to handle.

Hopefully the firmware can be improved on this.

Go to Top of Page
Reply #13

EmfDev

2260 Posts

Posted - 03/09/2022 :  18:16:03  Show Profile  Reply with Quote
Thank you for the info on the speed. So it seems adding a new command will be the best action.

If a command will be added it will just be
1. Erase SPI Chip.
2. Save CFG.

This should do it faster than other methods.
Go to Top of Page
Reply #14

ullix

Germany
1177 Posts

Posted - 03/09/2022 :  23:44:02  Show Profile  Reply with Quote
:-)) That would be great!

Then don't forget the command "Do you support command xyz", because otherwise you will need to distinguish by firmware version, which really gets messy!

And one more suggestion: I can set the power ON/OFF with a single command, but cannot READ THE POWERSTATUS. Instead I have to read the whole config solely to test one byte. Therefore a command like CONFIGBYTE(byteposition) would be helpful. There are more config-bytes which sometimes need checking, like alarm, speaker, saving mode, ...

Edited by - ullix on 03/10/2022 02:08:41
Go to Top of Page
Reply #15

EmfDev

2260 Posts

Posted - 03/11/2022 :  10:40:59  Show Profile  Reply with Quote
Yes if will inform the team about these features.
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.1 sec. Snitz's Forums 2000