Page 4 of 4

Re: Help needed!

Posted: Sun Apr 24, 2016 1:21 pm
by jjw
Hi Martin,

I did this and did desk test maybe a bit better field tests will show more.

Code: Select all

Timeout = 0
Speed = 0
It maybe a good idea to add a time out LED or display indication so you know when triggering was an issue.
Can you give that a go as it should be straight forward.
Can you help me with this addition.

jjw

Re: Help needed!

Posted: Sun Apr 24, 2016 1:47 pm
by medelec35
You need to decide what time-out indication is required e.g LED or LCD.
Then use a decision branch with the

Code: Select all

Timeout
variable.
If Yes branch then indicate time-out LED

Code: Select all

Port D1 = 1
(pin which you have LED conneted to): Delay 2 secs (so you can see LED lit):

Code: Select all

Timeout = 0
if No branch then

Code: Select all

Port D1 = 0
Or
If yes branch:

Code: Select all

LCDDisplay Cursor 
(suitable x y parameters)

Code: Select all

LCDDisplay PrintString "TOut!"
Give that a try and send updated Flowchart.

Martin

Re: Help needed!

Posted: Sat Apr 30, 2016 10:49 am
by jjw
Hi Martin,
Did yesterday 10 tests in the field with flowchart version 4 and with new MCU (Pic 18F4550) and with this addition into a flowchart:

Code: Select all

Speed = 0
Hard to say if better laps were recognized well and average speed was calculated right. The only problem was that you never know whether the program goes into a measuring mode or not. Sometimes it takes couple of pushes until it goes into the measuring mode. Any ideas what to do next?

Have you checked my flowchart version yet?

jjw

Re: Help needed!

Posted: Thu May 12, 2016 6:18 am
by jjw
Hi Martin,
Have been done lot of field tests during last 10 days. I’ve noticed one strange thing when powering on the user interface just before when starting the time taking process everything works just fine. After time taking powering off is necessary. I wonder why the program acts like this not a big deal I can live with it but anyway strange….

In my original scheme had in MCLR pin1 10k resistor then I added parallel resistor 1N4148 and 10uF capacitor from pin 1 into minus in order to get total reset when powering off. Hard to say if better not worse anyway. So the program works just fine maybe a little complicated to use.
Any idea why it acts like this?

Wbr,
Jukka

Re: Help needed!

Posted: Wed May 18, 2016 10:40 am
by jjw
Hi Martin,
Great thanks to you who patiently helped me so much with my long lasting project. Everything is working now properly.

Wbr,
jjw

Re: Help needed!

Posted: Thu Jun 08, 2017 7:47 am
by jjw
Hi Martin,
I automatized my time taking system it works mainly good but sometimes not….
I’ve been testing it for a while (manual part works fine) but have some problems with the automatic mode. I indicated problems when limit switch’s contacts opens and closes (same effect when pushing start button during the measuring). It can be seen also in a flowchart simulation when pushing the button during the test.

I have partly solved the problem with hardware by adding a this Arduino Nano Board in user interface but want to do it also in Flowchart.

I would like the flowchart work so that when pushing the start button (or in serial connected limit switch) it will count independently even more contacts will come during the measuring session.
Hopefully you could help me with the flowchart .....

Wbr,
jjw

Re: Help needed!

Posted: Fri Jun 16, 2017 8:14 am
by medelec35
Hi Jukka,
I will require more detailed information.
The switch does have contact debounce so after detection if switch is detected within 1.5 seconds again it's just ignored.
Are you wanting a small delay between laps so if pot is above the trigger value, the laps won't be counted too fast?

Martin

Re: Help needed!

Posted: Fri Jun 16, 2017 1:39 pm
by jjw
Hi Martin,
You wrote:
The switch does have contact debounce so after detection if switch is detected within 1.5 seconds again it's just ignored.
We have found that during the time taking process round 16 seconds when contacts opens and closing several times it causes problems. As far as I understand there are at least two ways to prevent this problem. One is to force to keep the state during time taking process at least 20 seconds constant. The other way is to keep situation constant during 11 laps this might be better.
Are you wanting a small delay between laps so if pot is above the trigger value, the laps won't be counted too fast?
No I don’t want any delays between the laps.

Wbr,
jjw

Re: Help needed!

Posted: Mon Jun 19, 2017 3:28 pm
by medelec35
Oh I believe I understand the problem.
Since changing to auto the switch will constantly be triggered by the plane so you don't want the lap number to be affected.
Try this simple solution:
In the port macro
Change

Code: Select all

allow_tmr && ((SwitchInhibit < 1500)
to

Code: Select all

(allow_tmr )&& (Temp < 10)
Also change:

Code: Select all

allow_tmr = !allow_tmr
to

Code: Select all

allow_tmr = 1
Do you also want a long press of the switch to restart?
Of course you will need switch connected in parallel with the relay.
Martin

Re: Help needed!

Posted: Mon Jun 19, 2017 5:12 pm
by jjw
Hi,
Great thanks to you Martin again. Anyway those changes works well in a simulation mode. Will test more in a field next week I let you know.

Wbr,
jjw

Re: Help needed!

Posted: Fri Jun 30, 2017 8:43 am
by jjw
Hi Martin,
The field tests went very well the software changes solved the problem. Thanks again for helping me :D .

Wbr,
jjw