Page 2 of 2
Re: App Developer/ SCADA Question
Posted: Tue May 25, 2021 12:56 pm
by steve001
Afternoon Gents
Sent a PM, to both of you
Regards
Steve
Re: App Developer/ SCADA Question
Posted: Tue May 25, 2021 2:11 pm
by p.erasmus
Steve,
Fisrt I do not have time to read this huge documentaion and try to figure all out however a quick scan raised some points with me
as below it seems the devise sends out 4 bytes when you read the at address 0x006/007 as one and secondly it looks like the data is already in Floatpoint form,

- P2.jpg (45.71 KiB) Viewed 6736 times
You need to look at the Readregister function and debug what this function is reading from the Devicse if you read or interpret the data received wrong you will never see the problem also the getResponce macro's you must debug to see what they contain

- P1.jpg (13.17 KiB) Viewed 6736 times
I think the long variable that you use for the RegisterRead macro is the wrong choice I would start with this macro and debug what is received in it and make may way out with getResponce macros and determine what is in each variable

- P2.jpg (15.4 KiB) Viewed 6730 times
may be Ben has a magic answer for you
Hope you come right
Re: App Developer/ SCADA Question
Posted: Tue May 25, 2021 3:27 pm
by p.erasmus
Steve.
Playing with your Logged Data I am sure now that the response is in Float .
your log writing and reading address 0x06

- P1.jpg (49.85 KiB) Viewed 6730 times
the meter answer with 43 70 28 F6 which is 240.16V
Converting the 4 bytes as the manual show to float get the correct response

- P2.jpg (14.67 KiB) Viewed 6730 times
I think with out having the instrument you should read the 4 bytes and use the conversion component to get the float value
I hope this helps
Re: App Developer/ SCADA Question
Posted: Tue May 25, 2021 6:31 pm
by steve001
Hi Peter,
Martin (mnf) posted in the old forums
https://www.matrixtsl.com/mmforums/view ... =7&t=21470
had a look again but still didn't understand it.
Steve
Re: App Developer/ SCADA Question
Posted: Tue May 25, 2021 7:16 pm
by p.erasmus
Steve
just use the TypeConversion macro to get you the float from 4 bytes
Re: App Developer/ SCADA Question
Posted: Thu May 27, 2021 7:49 am
by p.erasmus
Steve
Curious did you get this topic going now ?

Re: App Developer/ SCADA Question
Posted: Fri May 28, 2021 12:48 pm
by steve001
Hi Peter
Going to have another go this weekend, will let you know
Regards
Steve
Re: App Developer/ SCADA Question
Posted: Fri May 28, 2021 5:16 pm
by medelec35
p.erasmus wrote: ↑Tue May 25, 2021 7:16 pm
just use the TypeConversion macro to get you the float from 4 bytes
There is a great example
here.
Re: App Developer/ SCADA Question
Posted: Thu Jun 03, 2021 1:59 pm
by steve001
Afternoon All,
Getting mixed responses from the console when trying to view the modbus data ?
Sometimes when i run i get text in a blue text color - see console 1 (attached)
The next time i run without changing anything i can get a reply for 3 attempts then nothing - time outs
Any idea's to what is happening ?
Regards
Steve