Right, seems I haven't updated the firmware, just the software!
So updated the firmware now to 1.28.58. but was still showing as the old version. Ive done a full tear down and back up again and now all seems well.
Sorry for the confusion, i just hope this has fixed all my issues. (mental note, check for firmware updates as well)
In the code below I`m targeting a database called t_lg202001 which refers to a log table of a specific year and month. In this case January 2020. See code below:
SELECT a.EVTLGUID, a.DEVDT, a.USRID, c.NM, b.NM FROM t_lg202001 a JOIN t_evttyp b ON a.EVT = b.EVT JOIN t_usr c ON a.USRID = c.USRID WHERE a.USRID IS NOT NULL ORDER BY a.EVTLGUID DESC LIMIT 1;
As my target table is going to be update every month as the years goes by I need to change this line of code for every single month and afterwards years. i.e:
t_lg202001 = January 2020.
t_lg202002 = February 2020.
t_lg202012 = December 2020
t_lg202101 = January 2021
t_lg202112 = December 2021.
I really would like to manipulate that line of the code through a variable where I can automate as required.
Does anyone has any idea or how this can be done?
If there isn`t any way at the moment here is a suggestion of improvement for the coming versions of the Unilogic software which I think it`d be very beneficial and it would enable the capability of the software for the future.
I hope that makes sense.
I whole heartedly agree with "almost never", but as the saying goes "never say never"
When working with most sensor devices you have a finite range 0-20ma = 0-100% or 0-10bar or 0-12feet
using whole number math insulates you from idiot number results like a 1234% full tank,
it simply can't happen.
However you are trying to average positive and negative numbers, this would be a good place to have an
exception to the rule of thumb and use real numbers.
In "the old days" plc's could not handle real numbers well and used a long, long time to calculate them
this gave long CPU cycle times and not particularily good results.
Todays plc's have much better cpu's and can handle real numbers pretty well.
We are never trying to calculate the budgjet deficite of a world economy so 8 significant places
is good enough for us in real life usage.
Unitronics scaling is really easy min - max what you get input to min - max what you want output.
I would like to suggest that you filter out the unresonable values given by the arm passing in front.
If input > 123456 mm then goto end
run your stacked array average only with ok numbers.
"garbage in garbage out"