App Developer/ SCADA Question

For general Flowcode discussion that does not belong in the other sections.
steve001
Valued Contributor
Posts: 185
http://meble-kuchenne.info.pl
Joined: Wed Jan 13, 2021 7:15 pm
Has thanked: 81 times
Been thanked: 30 times

Re: App Developer/ SCADA Question

Post by steve001 »

Afternoon Gents

Sent a PM, to both of you

Regards

Steve

User avatar
p.erasmus
Valued Contributor
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: App Developer/ SCADA Question

Post 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
P2.jpg (45.71 KiB) Viewed 3760 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
P1.jpg (13.17 KiB) Viewed 3760 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
P2.jpg (15.4 KiB) Viewed 3754 times
may be Ben has a magic answer for you

Hope you come right
Regards Peter - QME Electronics

User avatar
p.erasmus
Valued Contributor
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: App Developer/ SCADA Question

Post 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
P1.jpg (49.85 KiB) Viewed 3754 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
P2.jpg (14.67 KiB) Viewed 3754 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
Attachments
P3.jpg
P3.jpg (17.31 KiB) Viewed 3754 times
Regards Peter - QME Electronics

steve001
Valued Contributor
Posts: 185
Joined: Wed Jan 13, 2021 7:15 pm
Has thanked: 81 times
Been thanked: 30 times

Re: App Developer/ SCADA Question

Post 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

User avatar
p.erasmus
Valued Contributor
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: App Developer/ SCADA Question

Post by p.erasmus »

Steve

just use the TypeConversion macro to get you the float from 4 bytes
Regards Peter - QME Electronics

User avatar
p.erasmus
Valued Contributor
Posts: 434
Joined: Thu Dec 03, 2020 12:01 pm
Location: Russia / Россия
Has thanked: 104 times
Been thanked: 88 times

Re: App Developer/ SCADA Question

Post by p.erasmus »

Steve

Curious did you get this topic going now ? :D
Regards Peter - QME Electronics

steve001
Valued Contributor
Posts: 185
Joined: Wed Jan 13, 2021 7:15 pm
Has thanked: 81 times
Been thanked: 30 times

Re: App Developer/ SCADA Question

Post by steve001 »

Hi Peter

Going to have another go this weekend, will let you know

Regards

Steve

medelec35
Matrix Staff
Posts: 1432
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 506 times
Been thanked: 468 times

Re: App Developer/ SCADA Question

Post 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.
Martin

steve001
Valued Contributor
Posts: 185
Joined: Wed Jan 13, 2021 7:15 pm
Has thanked: 81 times
Been thanked: 30 times

Re: App Developer/ SCADA Question

Post 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
Attachments
Modbus Test RI-F550 Read Voltage - ben.fcsx
(15.74 KiB) Downloaded 115 times
Console 2.JPG
Console 2.JPG (157.21 KiB) Viewed 3659 times
Console 1.JPG
Console 1.JPG (81.46 KiB) Viewed 3659 times

Post Reply