File tree 1 file changed +3
-10
lines changed
1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -3604,7 +3604,7 @@ Show how to emulate an SDM630 e.g. to interact with a GROWATT solar inverter.
3604
3604
3605
3605
??? summary "View script"
3606
3606
```
3607
- >D
3607
+ \ > D
3608
3608
; simulate eastron sdm630 modbus meter
3609
3609
IP=192.168.188.114
3610
3610
; need this additional defs
@@ -3632,9 +3632,9 @@ Show how to emulate an SDM630 e.g. to interact with a GROWATT solar inverter.
3632
3632
curr1=0
3633
3633
cpw1=0
3634
3634
cvol1=230
3635
- >B
3635
+ \ > B
3636
3636
=>sensor53 r
3637
- >BS
3637
+ \ > BS
3638
3638
; should be hardware serial pins
3639
3639
res=so(rec trx 9600 8N1 1024)
3640
3640
if res==0 {
@@ -3729,18 +3729,14 @@ Show how to emulate an SDM630 e.g. to interact with a GROWATT solar inverter.
3729
3729
next
3730
3730
; write response
3731
3731
smw(addr 3 resp regs)
3732
-
3733
3732
; multitasking every 1 ms
3734
3733
\> t1
3735
-
3736
3734
; get current power from meter
3737
3735
cmpwr=sml[ 3]
3738
-
3739
3736
; fake power
3740
3737
;cmpwr=3000+rnd(1000)
3741
3738
curr1=cmpwr/230/3
3742
3739
cpw1=cmpwr/3
3743
-
3744
3740
; check for incomming request
3745
3741
res=sa()
3746
3742
if res>=8 {
@@ -3770,10 +3766,7 @@ if res>=8 {
3770
3766
res=sa()
3771
3767
res=sra(resp)
3772
3768
}
3773
-
3774
3769
}
3775
-
3776
-
3777
3770
\> R
3778
3771
; close serial port
3779
3772
sc()
You can’t perform that action at this time.
0 commit comments