Miac analogue input problem

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

Moderators: Benj, Mods

Post Reply
Dave S
Posts: 39
Joined: Tue Jun 07, 2011 12:37 pm
Contact:

Miac analogue input problem

Post 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 231 times

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 9180
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Contact:

Re: Miac analogue input problem

Post 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.
Martin

Dave S
Posts: 39
Joined: Tue Jun 07, 2011 12:37 pm
Contact:

Re: Miac analogue input problem

Post by Dave S »

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: 9180
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Contact:

Re: Miac analogue input problem

Post by medelec35 »

Your welcome,
Just glad i could help.

Martin
Martin

Post Reply