¿ªÔÆÌåÓý

Help with EZGPIB


 

I am looking for help from someone experienced with EZGPIB, or possibly Pascal if any of this makes sense.

I wrote a program in EZGPIB that is working well to get data from my HP4192A.

?

Each read of data is in the following format which is added to a buffer and, at the end of the program, stored in a file. I think the reads are tab separated but that is not the problem.

?NZFN+017.78E+03,NTDN-005.38E+00,K+01.000000

?To remove unwanted characters (NZFN = |Z|, NTDN = Phase, K = kHz) I used

?Answer:=EZGPIB_ConvertStripToNumber(Answer);? // an EZGPIB function. Answer is a string variable

?This only strips the first characters so I get

?+017.78E+03,NTDN-005.38E+00,K+01.000000

?I think the comma terminates the string as far as the function is concerned. I don¡¯t know how to make the function remove all unwanted characters. Does anyone know?

I tried a different function three times to remove all characters. It works however I should be able to use it once with the proper formatting to do the job but I don¡¯t know how. Any suggestions?

?EZGPIB_ConvertRemove('NZFN', Answer);

EZGPIB_ConvertRemove('NTDN', Answer);

EZGPIB_ConvertRemove('K', Answer);

?The result is what I am after:

+017.78E+03,-005.38E+00,+01.000000

Join [email protected] to automatically receive all group messages.