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
 3. GQ EMF EF Meter RF Spectrum Power Analyzer
 GQ_EF_PRO.exe unattended download
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sc

United Kingdom
5 Posts

Posted - 07/22/2019 :  04:13:03  Show Profile  Reply with Quote
I'd like to download history from an EMF-390 in an automated setup. Is it possible to run it in batch with command line switches? Is the source code available?
Stuart

sc
Reply #1

EmfDev

2132 Posts

Posted - 07/22/2019 :  09:09:49  Show Profile  Reply with Quote
Hi sc, you can use the <SPIR>> command (http://www.gqelectronicsllc.com/download/GQ-RFC1701.txt).
Here is the format for the date. Date always starts with 0x55 0xAA.

time[0] = 0x55;
time[1] = 0xAA;
time[2] = Year; //20xx
time[3] = Month //01-12
time[4] = Day
time[5] = Hour
time[6] = Minute
time[7] = Second

and here's a format for the data

data[0] = 0xAA;
data[1] = 0X55;
data[2] = (temp >> 8) & 0xFF; //EMF is 16 bits the first 12 MSB are for the integer part of EMF
data[3] = temp & 0xFF; // then the 4LSB are for the decimal part. e.g 1.1 ==> 0000000000010001
// EF - bits of float type
data[4] = EF[0];
data[5] = EF[1];
data[6] = EF[2];
data[7] = EF[3];
// RF same as EF
data = RF[0];
data[9] = RF[1];
data[10] = RF[2];
data[11] = RF[3];
Go to Top of Page
Reply #2

sprezzatura

Canada
14 Posts

Posted - 02/05/2020 :  13:16:24  Show Profile  Reply with Quote
How do you know when the data is completed? (vg. no more data to transmit).
Go to Top of Page
Reply #3

EmfDev

2132 Posts

Posted - 02/05/2020 :  13:27:41  Show Profile  Reply with Quote
You can specify the number of data to be transmitted with the > command. But most of the commands are fast so you can just delay and wait a little bit.
Go to Top of Page
Reply #4

sprezzatura

Canada
14 Posts

Posted - 02/05/2020 :  15:31:00  Show Profile  Reply with Quote
Yes, I understand that you specify the amount of data in the command. But when do you stop?

I assume that to retrieve the data, you go into a loop. For example:

<SPIR0000001000>> (get '1000' bytes at address '000000')
<SPIR0010001000>> (get '1000' bytes at address '001000')
<SPIR0020001000>> (get '1000' bytes at address '002000')
etc.

How do you know in advance how much data there is to get? When do you stop the loop?
Go to Top of Page
Reply #5

EmfDev

2132 Posts

Posted - 02/05/2020 :  17:05:31  Show Profile  Reply with Quote
You can send the first command to get 1000 bytes of data, then receive the data (check if it's 1000), if not then continue receiving.
If the data is 1000, then stop. But after sometime, let's say 500ms or 1 second, if the data is still < 1000, then data is maybe corrupted so you can discard the data and repeat the command.
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.06 sec. Snitz's Forums 2000