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 EMF380v2 realtime datalogging TeraTerm macro

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an Image File
Check here to include your profile signature.
    

T O P I C    R E V I E W
Neko2 Posted - 02/06/2019 : 05:50:30
Hello, I have made a macro for TeraTerm to acquire data in real time for the GQ EMF380v2 meter connected to the computer, the macro is very simple and generates a csv file with the Computer DateTime, EMF, EF, RFTotal and RFTotalPeak values every 10 seconds. Terminate data acquisition by closing the connection with teraterm. I apologize because the variables and error messages are in Spanish.

---------------------------------------------

mtimeout=300
ValorEMF='0'
UdsEMF='-'
ValorEF='0'
UdsEF='-'
ValorRFTotal='0'
UdsRFTotal='-'
ValorRFTotalPico='0'
UdsRFTotalPico='-'
Primero=1
Cabecera='-'
Linea='-'
FechaHora='-'

; abre el archivo
getdate FechaHora 'EMF_%Y%m%d_%H%M%S.csv'

fileopen file FechaHora 0
if file=-1 then
messagebox 'Error: No puedo abrir el archivo' 'Error'
endif

; entra en modo sincrono
setsync 1
testlink

while result=2
getdate FechaHora '%d/%m/%Y %H:%M:%S'

send '<GETEMF>'
waitln ''
strsplit inputstr ' ' 4
ValorEMF=groupmatchstr3
if Primero=1 Then
UdsEMF=groupmatchstr4
endif

send '<GETEF>'
waitln ''
strsplit inputstr ' ' 4
ValorEF=groupmatchstr3
if Primero=1 Then
UdsEF=groupmatchstr4
endif

send '<GETRFTOTALDENSITY>'
waitln ''
strsplit inputstr ' ' 4
ValorRFTotal=groupmatchstr1
if Primero=1 Then
sprintf2 UdsRFTotal '%s %s'groupmatchstr2 groupmatchstr3
endif

send '<GETRFTOTALDENSITYPEAK>'
waitln ''
strsplit inputstr ' ' 4
ValorRFTotalPico=groupmatchstr1
if Primero=1 Then
sprintf2 UdsRFTotalPico '%s %s %s'groupmatchstr2 groupmatchstr3 groupmatchstr4
endif

if Primero=1 Then
sprintf2 Cabecera '%s,%s,%s,%s,%s' 'FechaHora' UdsEMF UdsEf UdsRFTotal UdsRFTotalPico
filewriteln file Cabecera
Primero=0
endif

sprintf2 Linea '%s,%s,%s,%s,%s' FechaHora ValorEMF ValorEf ValorRFTotal ValorRFTotalPico
filewriteln file Linea
send '<RESETRFPEAK>'
pause 10
testlink
endwhile

fileclose file
; entro en modo asincrono
setsync 0

---------------------------------------------
2   L A T E S T    R E P L I E S    (Newest First)
ZLM Posted - 02/06/2019 : 06:37:09
Good job. Thank you for sharing.
Neko2 Posted - 02/06/2019 : 06:18:36
Disclaimer: use at own risk

GQ Electronics Technical Support Forum © Copyright since 2011 Go To Top Of Page
Generated in 0.05 sec. Snitz's Forums 2000