Page 1 of 1

Miac analogue input problem

Posted: Wed Apr 17, 2013 4:52 pm
by Dave S
Hi, I have a program for the MIAC (Flowcode v 4.5) which reads an analogue value and uses it in a Timer. Read in 0-12V, approx 0-240.
Divide by 10 = 0-24. This value is used in a Delay function to give a delay of 0 to 24 seconds. I've done this before on Pic's and it works well.
Works great is simulation but not on the Miac. Fixed delays work fine so the problem is with the analogue input.
I've put a Macro Test at the start to make debugging simpler.
Any help gratefully received.
Dave.
WaterBalance.fcf
(25.81 KiB) Downloaded 382 times

Re: Miac analogue input problem

Posted: Wed Apr 17, 2013 5:44 pm
by medelec35
Hi Dave,
You need to add the Miac component to your control panel, then use the Miac components for reading ADC channels.
You don't use standard ADC components (if you do then the result will always be 0), so they will require deleting from your panel.


Best advice is to read the Miac programming operating guide, and look at Miac Examples.

Take a look here for the guide:
http://www.matrixmultimedia.com/miac.php

I posted a Miac voltmeter here:
http://www.matrixmultimedia.com/mmforum ... 256#p18126
You can then see how ADC component within Miac is used.

If your still stuck then please let us know.

Re: Miac analogue input problem

Posted: Wed Apr 17, 2013 5:59 pm
by Dave S
Thanks Medelec, yet again you have come to my rescue.
(If all else fails read the Manual :oops: )

Re: Miac analogue input problem

Posted: Wed Apr 17, 2013 6:19 pm
by medelec35
Your welcome,
Just glad i could help.

Martin