Hi, The result of a simple IF Else command is incorrect. I know this seems impossible but seeing is believing. Image attached. The variables have been set correctly; one WORD 'GVL.AC_Watts' and one BOOL 'GVL.AC_Running'. Why is the BOOL showing 'TRUE' when clearly 71 > 100 is 'FALSE'
I have attached the project (- API keys:) This is an early development
stage and u will soon see I am no real programmer, (an Elec Eng by
profession)... self taught in coding. IDE Codesys for RPI single core.
3.5 SP 17. The jpg was taken off the application when running on the RPI
with all field devices working ie Modbus kWhr meters. Note I am somewhat
stuck with the 32 Bit floating input from the House kWhr meter so I am
doing a bit of a fudge there. (It measures the total import / export power
to the house from the grid. I have not got a kWhr meter for the solar
inverter as I am hoping to access it by another API over my local network.
(Fronius playing dumb with that and haven't provided the API key promised
in their promotions.)I did not think to test the program in Simulation
prior to your email, but it turns out to have the same result. Thanks for
your interest / help.
Hi, The result of a simple IF Else command is incorrect. I know this seems impossible but seeing is believing. Image attached. The variables have been set correctly; one WORD 'GVL.AC_Watts' and one BOOL 'GVL.AC_Running'. Why is the BOOL showing 'TRUE' when clearly 71 > 100 is 'FALSE'
more posts ...
project please. and simulation mode or downloaded to plc? which ide version?
Hi,
I have attached the project (- API keys:) This is an early development
stage and u will soon see I am no real programmer, (an Elec Eng by
profession)... self taught in coding. IDE Codesys for RPI single core.
3.5 SP 17. The jpg was taken off the application when running on the RPI
with all field devices working ie Modbus kWhr meters. Note I am somewhat
stuck with the 32 Bit floating input from the House kWhr meter so I am
doing a bit of a fudge there. (It measures the total import / export power
to the house from the grid. I have not got a kWhr meter for the solar
inverter as I am hoping to access it by another API over my local network.
(Fronius playing dumb with that and haven't provided the API key promised
in their promotions.)I did not think to test the program in Simulation
prior to your email, but it turns out to have the same result. Thanks for
your interest / help.
Bernie_BBQ
On Sat, 31 Jul 2021 at 21:41, i-campbell forge@codesys.com wrote:
take a look in your Program Modbus
you wanted to check GVL.AC_Running = TRUE but you set it to true.
to avoid such mistakes simply use statements like
Thanks .. that fixed it ... GIGO once again :)
Regards
On Sun, 1 Aug 2021 at 01:55, Fless forge@codesys.com wrote: