Thank you for the infos.
The only way to readout V and A from the Channels ist the Command READ
READ output always all Channels in one String:
21.00V 22.00V 23.00V 24.00V ;1.100A 1.200A 1.300A 1.400A ;OFF F1 OFF F2 OFF F3 OFF F4
I need only the first 8 values.
Your Code for reading V and A dont work:
#scpiCmd getVoltage txrx? READ
:readmath: replace(getElement(value,inputValue-1,"[; ]"),"V","");
#scpiCmd getCurrent txrx? READ
:readmath: replace(getElement(value,inputValue+3,"[; ]"),"A","");
If i change inputValue+3 to inputValue+2, the output of getCurrent is 23V
Iam not a programmer, so i dont know what is wrong with the Code.
txrx? FREQ A
;; FREQ 001.038546E+3
Hello
Sorry to come back in the middle of this discussion. I finally managed to connect to my device with an AR488. It works pretty well.
I have the following problem. This device returns ASCII strings and I need to "extract" numbers. I am sending this command:Code: [Select]txrx? FREQ A
and it returns this:Code: [Select];; FREQ 001.038546E+3
1) How do I get the number out of this string?
2) Can I multiply this value by 1000 and convert it to an integer?
Can I send the resulting command on the command line to verify its behaviour?
#scpiCmd getFreqA? txrx? FREQ A
:readmath: getElement(value",1)
Two details:
You have to add a ? on the getCurrent and getVoltage commands
When using them you have to specify channel after the command, i.e. getCurrent? 1
Code: [Select]
#scpiCmd getFreqA? txrx? FREQ A
:readmath: getElement(value",1)
#value getVmaxA? V D1
#value getVminA? V D1
#value getFreqA? Hz D0
#scpiCmd getVmaxA? txrx? VMAX A
:readmath: getElement(value,1)
#scpiCmd getVminA? txrx? VMIN A
:readmath: getElement(value,1)
#scpiCmd getFreqA? txrx? FREQ A
:readmath: getElement(value,1)
#askValues getVmaxA?; getVminA?; getFreqA?;
#readingDelay 3
Now, I need to send 3 commands. Only the first one displays a result and then it gets stuck. These commands do work within Putty. I don't know if a terminator has to be sent in between.
Anyway, this is what I have:Code: [Select]#value getVmaxA? V D1
#value getVminA? V D1
#value getFreqA? Hz D0
Code: [Select]#askValues getVmaxA?; getVminA?; getFreqA?;
#askValues getFreqA?;[100];getVmaxA?;[100];getVminA?;[100];
Still no success.
Starting
;; jSerialComm version: 2.9.1
;; COM5: Set params: 115200
;; Start thread for: AR488 A:6 - Philips PM6666
;; COM5: Tx: <++default.> 2B 2B 64 65 66 61 75 6C 74 0A
;; Found Philips PM6666 on AR488 A:6
;; PM6666: Tx <getFreqA?>
;; PM6666: Tx <txrx? FREQ A
:readmath: getElement(value,1)>
;; COM5: Tx: <++addr 6.> 2B 2B 61 64 64 72 20 36 0A
;; COM5: Tx: <FREQ A.> 46 52 45 51 20 41 0A
;; COM5: Tx: <++read_tmo_ms 2950.> 2B 2B 72 65 61 64 5F 74 6D 6F 5F 6D 73 20 32 39 35 30 0A
;; COM5: Tx: <++read eoi.> 2B 2B 72 65 61 64 20 65 6F 69 0A
;; COM5: Rx: <FREQ 001.183061E+4> 46 52 45 51 20 20 20 30 30 31 2E 31 38 33 30 36 31 45 2B
34
;; PM6666: Rx <001.183061E+4>
;; PM6666: Delay: 100ms
;; PM6666: Tx <getVmaxA?>
;; PM6666: Tx <txrx? VMAX A
:readmath: getElement(value,1)>
;; COM5: Tx: <VMAX A.> 56 4D 41 58 20 41 0A
;; COM5: Tx: <++read eoi.> 2B 2B 72 65 61 64 20 65 6F 69 0A
;; COM5: Rx: <FREQ 001.183048E+4> 46 52 45 51 20 20 20 30 30 31 2E 31 38 33 30 34 38 45 2B
34
;; PM6666: Rx <001.183048E+4>
;; PM6666: Delay: 100ms
;; PM6666: Tx <getVminA?>
;; PM6666: Tx <txrx? VMIN A
:readmath: getElement(value,1)>
;; COM5: Tx: <VMIN A.> 56 4D 49 4E 20 41 0A
;; COM5: Tx: <++read eoi.> 2B 2B 72 65 61 64 20 65 6F 69 0A
;; COM5: Rx: <FREQ 001.183052E+4> 46 52 45 51 20 20 20 30 30 31 2E 31 38 33 30 35 32 45 2B
34
++addr 6
++auto 1
freq a
FREQ 001.181477E+4
vmax a
VMAX 0000000.28E+0
vmin a
VMIN -000000.26E+0
I fired the debug mode under windows and I got the following:
I think the only way to do this is programming the Grid Panel
I Read and search in the Manual but I have no idea for the following problems:
1. I need On/Off Buttons for every channel, I can make them but they give no reaction with right mouse click
2. how I can switch channel on with one Command? (I must send 2 Commands „sel 1“ and „enable“)
3. The Math readouts in Grid Panel give output „0.0000AH“ but I need „0.00 AH“
4. I need Digital font in Grid Panel, is it possible to use other fonts?
5. what basic interface commands can I use with the Hameg 7044?
Another point: In putty it looks like your are using a GPIB interface, but not in TestController, why?
#idString PM6666/016/32,,
#name Philips PM6666
#handle PM6666
#port GPIB
#driver ascii
#eol \r\n
#value FreqA Hz D0
#value VmaxA V D2
#value VminA V D2
#scpiCmd getID? txrx? id?
#scpiCmd getFreqA? txrx? FREQ A
:readmath: getElement(value,1)
#scpiCmd getVmaxA? txrx? VMAX A
:readmath: getElement(value,1)
#scpiCmd getVminA? txrx? VMIN A
:readmath: getElement(value,1)
#askValues getFreqA?;[100];getVmaxA?;[100];getVminA?;[100];
#readingDelay 3
Current def. file (still no success, same as before)
;; COM5: Tx: <++read_tmo_ms 2950.> 2B 2B 72 65 61 64 5F 74 6D 6F 5F 6D 73 20 32 39 35 30 0A
;; COM5: Tx: <++read eoi.> 2B 2B 72 65 61 64 20 65 6F 69 0A
++auto 1
Is there a way to not send these 2 commands:Code: [Select];; COM5: Tx: <++read_tmo_ms 2950.> 2B 2B 72 65 61 64 5F 74 6D 6F 5F 6D 73 20 32 39 35 30 0A
;; COM5: Tx: <++read eoi.> 2B 2B 72 65 61 64 20 65 6F 69 0A
To me, that the ones that creates the problems.
And can we send this command instead:Code: [Select]++auto 1
Quote++read eoi is controlled with #gpibReadEol
++read_tmo_ms is controlled with #readingDelay
On the GPIB tab you can add direct commands to the GPIB interface in the "Settings" column
++auto 1
to the GPIB settings and use this file:#idString PM6666/016/32,,
#name Philips PM6666
#handle PM6666
#port GPIB
#driver ascii
;#eol \r\n
#value FreqA Hz D0
#value VmaxA V D2
#value VminA V D2
#scpiCmd getID? txrx? id?
#scpiCmd getFreqA? txrx? FREQ A
:readmath: getElement(value,1)
#scpiCmd getVmaxA? txrx? VMAX A
:readmath: getElement(value,1)
#scpiCmd getVminA? txrx? VMIN A
:readmath: getElement(value,1)
;#askValues getFreqA?;[100];getVmaxA?;[100];getVminA?;[100];
#askValues getFreqA?;getVmaxA?;getVminA?;
;++read_tmo_ms is controlled with #readingDelay
#readingDelay 3
;++read eoi is controlled with #gpibReadEol
#gpibReadEol 10
How can i seperate the Volt and Current Output from PS:
;getting Volt & Current Setting value from PS
;in this Case 14.4V and 03.0A
GETS
144030
Iam working on Ascii-Driver for a HCS3004
Thank you for your help.
Your Program is so extensive, i must learn all Commands to use it but iam an old Guy, to old
Sorry i made a Mistake, the PS called HCS 3404 from China. In Germany is called Voltcraft DPPS-60-10
https://www.manson.com.hk/product/hcs-3404-usb/
Ok, one Problem:
#scpiCmd getON? txrx? GETD
:readmath: (substring(value,8,9))
Here is the result "0" or "1" but i need ON and OFF
Can i add an Formula in the readmath to do this?
I will post the final definition but i think i can only make standart txt for read and set the values.
I will do much more but my old Brain doesnt understand the many formulas
The readout Voltage is switching sometimes from 15V to 1V, see Picture attached.
#scpiCmd setV tx VOLT(value)
#scpiCmd setC tx CURR(value)
#interface setOn outON
#interface setOff outOFF
#interface readVoltage 0
#interface readCurrent 0