WEB APP HTTP Protocol

Discuss PC Developer and Web Developer projects and features here.
daddytims_tims
Posts: 74
http://meble-kuchenne.info.pl
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 110 times
Been thanked: 13 times

Flowcode v10 1 BUTTON UPDATE ALL GUAGES

Post by daddytims_tims »

Hi

I need Help
Still not getting through :? whatever I do I always ended up back with the last read reading. "Str2"

In the Top section where the decision box are that's what I used to update my gauges using the 2button.
Then I added the Goto function to see if I could grad the 2 data and with 1 button and display it.
Still returning 1 reading.


In the disabled section I added those alone and the readings still returns 1 number.

what am i not doing right?

Regards
Ryan
Attachments
WebProject-02a_TwoGuage.fcsx
(24.81 KiB) Downloaded 56 times
Embedded Project.png
Embedded Project.png (126.53 KiB) Viewed 3336 times

Steve-Matrix
Matrix Staff
Posts: 1465
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 204 times
Been thanked: 347 times

Re: WEB APP HTTP Protocol

Post by Steve-Matrix »

I've had a look at the Web Developer app and I can see a few errors there in the GetValue macro. Here's what I think is happening:

The first 3 icons initiate a Fetch for the page name to "getvalue" whereas your embedded app is looking for "getvalue.htm", so that Fetch returns with "unknown page".

The second 3 icons set the page name to "setvalue" but mistakenly set it for the wrong Fetch component (FetchForReadVal instead of FetchForReadVal1). The Fetch is then called for the correct FetchForReadVal1 component and this uses the hardcoded url set in its property (which is set to "http://192.168.100.230/setvalue.htm").

The upshot of all this is that the first Fetch returns with a string ("unknown error") and Gauge1 is set to this value (which is probably zero). The second Fetch returns with your embedded Str2 string and this gets set on Gauge2.

Fixing the urls so they refer to "setvalue.htm" and "getvalue.htm" should fix it, but remember to also set the url for the correct FetchForReadVal1 component.

daddytims_tims
Posts: 74
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 110 times
Been thanked: 13 times

Flowcode v10 1 BUTTON UPDATE ALL GUAGES

Post by daddytims_tims »

Hi Steve

Thanks, a lot for pointing those mistakes for me.

My app is now working as "EXPECTED" :D :D

Regards

Post Reply