This is for a frequency counter (Fluke PM6685). When I am in FREQ1 (frequency mode) or PER1 (period mode) I need to use Read? But when in TOT1 (count mode) need to use FETC:ARR? –1.
I tried below, but did not work.
#askValues [mode:FREQ1]Read?;[mode:TOT1]FETC:ARR?–1;
It looks mostly correct, I believe you are missing a space before -1
Try checking you mode using:
=deviceMode(handle_in_quotes)
You can also use debug mode to see if the correct inquiry is sent to the device.
Hi,
Thanks for this. Still don't get it to work.
When the meter is asked for mode with FUNC?, it returns FREQ 1 for frequency and TOT 1 for counting. I then use #askModeMathFormat replace(value," ","") to remove the space so I can make it match with modes for #cmdMode.
Debug window then respond:
;; Found Fluke PM6685 on USB Serial Device (COM3) (COM3)
;; PM6685: Tx <FUNC?>
;; PM6685: Rx <"FREQ 1">
;; PM6685: Rx after :readmath: replace(value," ","") <"FREQ1">
So all good.
And everything works before i tired to add a different way of getting data for counting including pulse width and duty cycle. All are read with READ? except for count which I now want to add.
When switching to current values tab to start read from the meter i now get:
;; Cannot read from device PM6685, #askValues is not defined
;; PM6685: Rx as numbers <>
I suspect the problem is some colon, semicolon or parenthesis or something missing. But have been trying lots.
Also a related questions, if 3 modes use READ? to get the data and 1 mode use FETC:ARR? –1 to fetch data, how is this best written? Can more than one mode be covered by one Mode= statement or use one mode= for each mode?
If you be ok to look at the definition file it is here.
https://www.dropbox.com/s/pt1sk8lxf2md1hy/0%20Fluke%20PM6685.txt?dl=0Thanks a lot!