akapuma and 104 Guests are viewing this topic.
I will investigate and report back.Good to hear that you now also have a Eletechsup module and playing with it. The ones with a implementation on the MindMotion micro controller, NT48xxx, N4DAC02, N4IOA01 and 10IOAxx are very fast.
How do I process the content of the packed value into the :readmath: binConv(int(value),0,2,1) ?
I will check and improve it if I can and repost the definition. Give me the weekend, ok ?
#idString Circutor,CVM-144,#name Circutor-CVM144#handle CVM144#driver Modbus#subdriver RTU#port 502;#baudrate 9600#author Benleentje;ask for 20 values what is de maximum for the device #scpiCmd Actual1? holdingL? 0x0000 0x0014 ;ask for one value#scpiCmd Actual2? holdingL? 0x0028 0x0001 /10;value 1 / 20#value V1 V D3#value A1 mA D3#value W1 W D3#value var1 var D3#value PF1 - D3#value V2 V D3#value A2 mA D3#value W2 W D3#value var2 var D3#value PF2 - D3#value V3 V D3#value A3 mA D3#value W3 W D3#value var3 var D3#value PF3 - D3#value W3P W D3#value varL3P var D3#value varC3P var W D3#value cos phi - D3 #value PF3P - D3;21e value#value L1 Hz D3#askValues Actual1? 1000; Actual2?
I am working on the definition for Circutor Cvm144There is total 165 32 bit registers to read, but i can only read 20 at any time from the deviceTo read 20 works great. I get correct valueThe 21e not so good, it shows the wrong value.If i do it at the commandline i get the right value
TC do decode this correct:192.168.2.30: Rx: 01 03 04 00 00 01 F4 FA 24;; CVM144: Rx <50.0>0x01F4/10 is 50.0
But why is there another line below the rx 50.0
ThanksToday i tryed to read 2 times 20 values and added 20 extra #value'sKnow i see that there is 2 value's in between what has to filtered out. You told me to use #askValuesReadFormat. But i do not understand how to use it.To be clear i get first 20 correct value's then i get 2 wrong values and then i get 20 good value's againFor know i captured the 2 extra value with a #value dummy1 - D0 line for each extra value. Then i know that value is not to be used.
You told me to use #askValuesReadFormat. But i do not understand how to use it.
; Format of answer: f=float, u=remove trailing letters, x=skip, *=Zero upper case values if this value is 0#askValuesReadFormat ux
#askValuesReadFormat ffffffffffffffffffffffffffffffff
#askValuesReadFormat [Mode:VMIN-V1,VMIN-A1,VMAX-V1,VMAX-A1,VPP-V1,VPP-A1,VBASe-V1,VBASe-A1,VTOP-V1,VTOP-A1,VAMP-V1,VAMP-A1,VLOWer-V1,VLOWer-A1,VUPPer-V1,VUPPer-A1,VMID-V1,VMID-A1,VAVG-V1,VAVG-A1,VRMS-V1,VRMS-A1,VSDeviation-V1,VSDeviation-A1,VPPReshoot-V1,VPPReshoot-A1,VNPReshoot-V1,VNPReshoot-A1,VPOVershoot-V1,VPOVershoot-A1,VNOVershoot-V1,VNOVershoot-A1,VPARea1,VNARea1,VAARea1,VNAArea1,VPPArea1,VNPArea1,VAPArea1,VNAPArea1,HRTime1,HFTime1,HPERiod1,HHWidth1,HLWidth1,HFReq1,HHDuty1,HLDuty1,RECount1,FECount1,PPCount1,NPCount1]F[Mode:VMIN-V2,VMIN-A2,VMAX-V2,VMAX-A2,VPP-V2,VPP-A2,VBASe-V2,VBASe-A2,VTOP-V2,VTOP-A2,VAMP-V2,VAMP-A2,VLOWer-V2,VLOWer-A2,VUPPer-V2,VUPPer-A2,VMID-V2,VMID-A2,VAVG-V2,VAVG-A2,VRMS-V2,VRMS-A2,VSDeviation-V2,VSDeviation-A2,VPPReshoot-V2,VPPReshoot-A2,VNPReshoot-V2,VNPReshoot-A2,VPOVershoot-V2,VPOVershoot-A2,VNOVershoot-V2,VNOVershoot-A2,VPARea2,VNARea2,VAARea2,VNAArea2,VPPArea2,VNPArea2,VAPArea2,VNAPArea2,HRTime2,HFTime2,HPERiod2,HHWidth2,HLWidth2,HFReq2,HHDuty2,HLDuty2,RECount2,FECount2,PPCount2,NPCount2]F[Mode:VMIN-V3,VMIN-A3,VMAX-V3,VMAX-A3,VPP-V3,VPP-A3,VBASe-V3,VBASe-A3,VTOP-V3,VTOP-A3,VAMP-V3,VAMP-A3,VLOWer-V3,VLOWer-A3,VUPPer-V3,VUPPer-A3,VMID-V3,VMID-A3,VAVG-V3,VAVG-A3,VRMS-V3,VRMS-A3,VSDeviation-V3,VSDeviation-A3,VPPReshoot-V3,VPPReshoot-A3,VNPReshoot-V3,VNPReshoot-A3,VPOVershoot-V3,VPOVershoot-A3,VNOVershoot-V3,VNOVershoot-A3,VPARea3,VNARea3,VAARea3,VNAArea3,VPPArea3,VNPArea3,VAPArea3,VNAPArea3,HRTime3,HFTime3,HPERiod3,HHWidth3,HLWidth3,HFReq3,HHDuty3,HLDuty3,RECount3,FECount3,PPCount3,NPCount3]F[Mode:VMIN-V4,VMIN-A4,VMAX-V4,VMAX-A4,VPP-V4,VPP-A4,VBASe-V4,VBASe-A4,VTOP-V4,VTOP-A4,VAMP-V4,VAMP-A4,VLOWer-V4,VLOWer-A4,VUPPer-V4,VUPPer-A4,VMID-V4,VMID-A4,VAVG-V4,VAVG-A4,VRMS-V4,VRMS-A4,VSDeviation-V4,VSDeviation-A4,VPPReshoot-V4,VPPReshoot-A4,VNPReshoot-V4,VNPReshoot-A4,VPOVershoot-V4,VPOVershoot-A4,VNOVershoot-V4,VNOVershoot-A4,VPARea4,VNARea4,VAARea4,VNAArea4,VPPArea4,VNPArea4,VAPArea4,VNAPArea4,HRTime4,HFTime4,HPERiod4,HHWidth4,HLWidth4,HFReq4,HHDuty4,HLDuty4,RECount4,FECount4,PPCount4,NPCount4]F[Mode:VMIN-V5,VMIN-A5,VMAX-V5,VMAX-A5,VPP-V5,VPP-A5,VBASe-V5,VBASe-A5,VTOP-V5,VTOP-A5,VAMP-V5,VAMP-A5,VLOWer-V5,VLOWer-A5,VUPPer-V5,VUPPer-A5,VMID-V5,VMID-A5,VAVG-V5,VAVG-A5,VRMS-V5,VRMS-V5,VSDeviation-V5,VSDeviation-A5,VPPReshoot-V5,VPPReshoot-A5,VNPReshoot-V5,VNPReshoot-A5,VPOVershoot-V5,VPOVershoot-A5,VNOVershoot-V5,VNOVershoot-A5,VPARea5,VNARea5,VAARea5,VNAArea5,VPPArea5,VNPArea5,VAPArea5,VNAPArea5,HRTime5,HFTime5,HPERiod5,HHWidth5,HLWidth5,HFReq5,HHDuty5,HLDuty5,RECount5,FECount5,PPCount5,NPCount5]F[Mode:VMIN-V6,VMIN-A6,VMAX-V6,VMAX-A6,VPP-V6,VPP-A6,VBASe-V6,VBASe-A6,VTOP-V6,VTOP-A6,VAMP-V6,VAMP-A6,VLOWer-V6,VLOWer-A6,VUPPer-V6,VUPPer-A6,VMID-V6,VMID-A6,VAVG-V6,VAVG-A6,VRMS-V6,VRMS-A6,VSDeviation-V6,VSDeviation-A6,VPPReshoot-V6,VPPReshoot-A6,VNPReshoot-V6,VNPReshoot-A6,VPOVershoot-V6,VPOVershoot-A6,VNOVershoot-V6,VNOVershoot-A6,VPARea6,VNARea6,VAARea6,VNAArea6,VPPArea6,VNPArea6,VAPArea6,VNAPArea6,HRTime6,HFTime6,HPERiod6,HHWidth6,HLWidth6,HFReq6,HHDuty6,HLDuty6,RECount6,FECount6,PPCount6,NPCount6]F[Mode:VMIN-V7,VMIN-A7,VMAX-V7,VMAX-A7,VPP-V7,VPP-A7,VBASe-V7,VBASe-A7,VTOP-V7,VTOP-A7,VAMP-V7,VAMP-A7,VLOWer-V7,VLOWer-A7,VUPPer-V7,VUPPer-A7,VMID-V7,VMID-A7,VAVG-V7,VAVG-A7,VRMS-V7,VRMS-A7,VSDeviation-V7,VSDeviation-A7,VPPReshoot-V7,VPPReshoot-A7,VNPReshoot-V7,VNPReshoot-A7,VPOVershoot-V7,VPOVershoot-A7,VNOVershoot-V7,VNOVershoot-A7,VPARea7,VNARea7,VAARea7,VNAArea7,VPPArea7,VNPArea7,VAPArea7,VNAPArea7,HRTime7,HFTime7,HPERiod7,HHWidth7,HLWidth7,HFReq7,HHDuty7,HLDuty7,RECount7,FECount7,PPCount7,NPCount7]F[Mode:VMIN-V8,VMIN-A8,VMAX-V8,VMAX-A8,VPP-V8,VPP-A8,VBASe-V8,VBASe-A8,VTOP-V8,VTOP-A8,VAMP-V8,VAMP-A8,VLOWer-V8,VLOWer-A8,VUPPer-V8,VUPPer-A8,VMID-V8,VMID-A8,VAVG-V8,VAVG-A8,VRMS-V8,VRMS-A8,VSDeviation-V8,VSDeviation-A8,VPPReshoot-V8,VPPReshoot-A8,VNPReshoot-V8,VNPReshoot-A8,VPOVershoot-V8,VPOVershoot-A8,VNOVershoot-V8,VNOVershoot-A8,VPARea8,VNARea8,VAARea8,VNAArea8,VPPArea8,VNPArea8,VAPArea8,VNAPArea8,HRTime8,HFTime8,HPERiod8,HHWidth8,HLWidth8,HFReq8,HHDuty8,HLDuty8,RECount8,FECount8,PPCount8,NPCount8]F[Mode:VMIN-V9,VMIN-A9,VMAX-V9,VMAX-A9,VPP-V9,VPP-A9,VBASe-V9,VBASe-A9,VTOP-V9,VTOP-A9,VAMP-V9,VAMP-A9,VLOWer-V9,VLOWer-A9,VUPPer-V9,VUPPer-A9,VMID-V9,VMID-A9,VAVG-V9,VAVG-A9,VRMS-V9,VRMS-A9,VSDeviation-V9,VSDeviation-A9,VPPReshoot-V9,VPPReshoot-A9,VNPReshoot-V9,VNPReshoot-A9,VPOVershoot-V9,VPOVershoot-A9,VNOVershoot-V9,VNOVershoot-A9,VPARea9,VNARea9,VAARea9,VNAArea9,VPPArea9,VNPArea9,VAPArea9,VNAPArea9,HRTime9,HFTime9,HPERiod9,HHWidth9,HLWidth9,HFReq9,HHDuty9,HLDuty9,RECount9,FECount9,PPCount9,NPCount9]F[Mode:Phase10,Delay10]F[Mode:Phase11,Delay11]F[Mode:AWGHz]F[Mode:CNTFREQ13,CNTPER13,CNTTOT13]F[Mode:CNTFREQ14,CNTPER14,CNTTOT14]F[Mode:CNTFREQ15,CNTPER15,CNTTOT15]F[Mode:CNTFREQ16,CNTPER16,CNTTOT16]F[Mode:DVMDC17,DVMAC17,DVMACDC17]F
#scpiCmd readTempAll? holding? 0x00 7 /10#askValues readTempAll?Works great for the NT18B07 very fast !!However for not connected NTC's the output should return -2731 (dec) or -273.1 dec /10) and now it is returning 6280.5.;; NT18B07: Tx <readTempAll?>;; NT18B07: Tx <holding? 0x00 7 /10>;; COM5: Tx: 01 03 00 00 00 07 04 08;; COM5: Rx: 01 03 0E 00 DF F5 55 F5 55 F5 55 F5 55 F5 55 F5 55 3B AF;; NT18B07: Rx <22.3 6280.5 6280.5 6280.5 6280.5 6280.5 6280.5>;; 22.3 6280.5 6280.5 6280.5 6280.5 6280.5 6280.5How do I filter out this value ?
But are you saying that of the 20 value you read the last two are useless?
Try using holdingS? instead, then you will get signed return values.
That fixed it. Thank you for your remark about multiple register read. The readout speed increased with a factor 10x.
I will investigate how many registers I can read in 1 call for the NT28 and N48 modules. Then I can improve them as well, the NT48 will be then even more faster.
The definition for the CVM144 is ready.Please add the definition
I can convert an integer "value" into ascii with :readmath: binConvString(int(value & 0xFF),0,1,"ISO-8859-1",1)Now when I want to do the reverse, what command do I need, e.g. A --> 65 ?int(value) does not work when value="A"