Bugs and other creepy crawlies.

rossw

Active Member
v03.02.18a
 
Input 1 set to "counter" mode.
"Status" page shows counter incrementing just fine.
The secondary/additional "Status" window opened from the "PLC program" page shows counter value of 0, not changing.
 
Ross,
 
I just tested, it does not have the problem you described.  Try this PLC code:
start
 
set var1 counter
 
end
 
To see if counter increment, and VAR1 also increment.  My test showed it increment together.
 
You can also look that "status" page directly as
http://192.168.1.15/statuswin.htm
 
where your IP address could be different from 192.168.1.15.
 
 
I think I know what you talked about.  In the WC home page, once you enabled "web polling enabled", it will auto refresh every 5 seconds or so.  However, the pop-up screen, statuswin.htm does not have auto-refresh function. It was for viewing once during writing PLC program.  That is correct, not a bug.  If you want to get updated value, using browser refresh function to let that page reload latest values.
 
CAI_Support said:
I just tested, it does not have the problem you described.  Try this PLC code:
start
 
set var1 counter
 
end
 
To see if counter increment, and VAR1 also increment.  My test showed it increment together.
 
Yes, I have similar code in my program, which is why I know the problem exists - counter variable on status screen isn't counting, but var(x) was!
 
CAI_Support said:
You can also look that "status" page directly as
http://192.168.1.15/statuswin.htm
 
where your IP address could be different from 192.168.1.15.
 
 
I think I know what you talked about.  In the WC home page, once you enabled "web polling enabled", it will auto refresh every 5 seconds or so.  However, the pop-up screen, statuswin.htm does not have auto-refresh function. It was for viewing once during writing PLC program.  That is correct, not a bug.  If you want to get updated value, using browser refresh function to let that page reload latest values.
 
 
http://x.x.x.x:y/statuswin.htm is what I'm talking about. If you turn "web polling" on, that page DOES constantly update (and it's a good thing it does!).
Pressing "refresh" does update, but still doesn't show the counter!  The other variables and Analog input are updating every second... but counter remains at 0.
 
CAI_Support said:
I tested on my board does.  Maybe your board did not have latest gui update?
 
v03.02.18a  ???
 
Edit: Wayne, I've emailed you a short video of the issue.
 
We did send you a updated gui code.  That has comment removal feature, Did you install that?
You might load with pre-public released version.  Please try to update with the download link from another thread on this forum.  And let us know if that is any different.  The board running in front of me does have counter updated.
 
We looked your video, it does not show what was counter should be read.  You did not show the index.htm showing that counter reading at all.  Counter count pulses input into TTL IP1 when that is configured as counter.  Did you have some kind of pulses input that actually changed value on the index.htm, but did not changed value in the statuswin.htm?
 
Watched your video again, and we noticed you are running that weather station PLC code, which set VAR7 for displaying, then
set counter 0
 
I think because that counter is set to zero longer than it actually has something in it, it is probably why you see it zero.
You will need to put a simple test program without reset counter to zero, to see if that is changing or not.
 
Why don't you use FCOUNTER to count the wind speed?  Is that wind sensor input frequency too low?
 
CAI_Support said:
Watched your video again, and we noticed you are running that weather station PLC code, which set VAR7 for displaying, then
set counter 0
 
I think because that counter is set to zero longer than it actually has something in it, it is probably why you see it zero.
You will need to put a simple test program without reset counter to zero, to see if that is changing or not.
 
Why don't you use FCOUNTER to count the wind speed?  Is that wind sensor input frequency too low?
 
It only resets to zero once every 5 minutes (roughly, as directed by the server).
The counter increments fine when viewed on the main (status/index) page.
Yes, the input is far too slow for fcounter (which is why I was asking you about a period counter that might work in us or ms or other higher granularity time)
Input will range from 0hz to about 60hz maximum. Problem is that 1Hz simply doesn't give the required precision of speed (1Hz is about 4 miles/hour steps, which is nowhere near adequate. That's why I accumulate pulses for 300 seconds, so I can get a good "average" speed, and take the peak gust over 3 seconds (which gets me down to "almost" 1 mile/hour gust resolution. Less than I would like, but all I can have)
 
In your PLC code, there is a
set counter 0 line, I don't know if that got executed.
Basically, there is one CPU execute everything inside WC board. When it handles HTML request to display, PLC program is holding. Whatever last counter value will be retrieved and displayed.  We are pretty sure there is no bug in the WC part.
 
You are correct the frequency counter will not work well, if input pulses is only few in a second. It can measure 50Hz, or maybe as low as 30 Hz, but below 10Hz may not be that accurate.
 
I just logged into your WC board remotely, it seems the counter is displaying now. Did you make some change to the PLC code?
 
CAI_Support said:
We are pretty sure there is no bug in the WC part.
 
 
I can't make it much plainer than a video....
 
http://general.rossw.net/webcontrol/cai/wc8-counter-bug.m4v
 
Here you can see on the same screen, together at the same time, the "index" page and the "status" page.
Both are updating. Registers, analog values etc.
On the "index" page, the counter is incrementing at approx 3hz, on the status page, the counter is only showing the value it was when I opened the status page, and does not update the counter (but it DOES continue to update the other data)
 
Your board currently has counter input as zero. 
I sent you a update file for statuswin.htm change, hope that works for you.
 
CAI_Support said:
Your board currently has counter input as zero. 
I sent you a update file for statuswin.htm change, hope that works for you.
 
The counter input has stopped, because I turned the fan off. (It's the middle of winter here!)
 
Back
Top