Miac analogue input problem

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

Dave S
Posts: 39
Joined: Tue Jun 07, 2011 12:37 pm
Has thanked: 12 times
Been thanked: 5 times
Contact:

Miac analogue input problem

Postby Dave S » Wed Apr 17, 2013 4:52 pm

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 164 times

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8412
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2401 times
Been thanked: 3434 times
Contact:

Re: Miac analogue input problem

Postby medelec35 » Wed Apr 17, 2013 5:44 pm

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:
viewtopic.php?f=28&t=7256#p18126
You can then see how ADC component within Miac is used.

If your still stuck then please let us know.
These users thanked the author medelec35 for the post (total 2):
Dave S (Wed Apr 17, 2013 5:57 pm) • LeighM (Thu Apr 18, 2013 8:25 am)
Rating: 10.53%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

Dave S
Posts: 39
Joined: Tue Jun 07, 2011 12:37 pm
Has thanked: 12 times
Been thanked: 5 times
Contact:

Re: Miac analogue input problem

Postby Dave S » Wed Apr 17, 2013 5:59 pm

Thanks Medelec, yet again you have come to my rescue.
(If all else fails read the Manual :oops: )

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8412
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2401 times
Been thanked: 3434 times
Contact:

Re: Miac analogue input problem

Postby medelec35 » Wed Apr 17, 2013 6:19 pm

Your welcome,
Just glad i could help.

Martin
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.