MIAC Expansion modules.

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

Moderators: Benj, Mods

thusharag
Flowcode v5 User
Posts: 42
Joined: Wed Jun 22, 2011 10:42 am
Has thanked: 7 times
Been thanked: 3 times
Contact:

MIAC Expansion modules.

Postby thusharag » Thu Dec 06, 2012 6:03 pm

hi,
I have few thins to be clarified with regard to the MIAC expansions basic and advance
1. can we use all I/O lines as digital inputs givin +5V to them? In both Basic and advanced expansions.
2. OR can we use all the T connections (T1 to T18 in Basic and T1 to T15 in advanced) as digital inputs in both basic and advanced expansion modules?
I tried to use inputs as digital inputs in Basic expansion module by making the programming by using switches and connecting them with T connections of the Basic expansion in flow code. But couldnt get possitive results.


I hope you can get my situation. Looking forward for a clear clarification.

Thanks,

thushara
Thanks & Regards,
Thushara Goonathilake.

User avatar
LeighM
Matrix Staff
Posts: 1888
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 445 times
Been thanked: 640 times
Contact:

Re: MIAC Expansion modules.

Postby LeighM » Fri Dec 07, 2012 9:42 am

Hi Thushara
Yes, you can use all I/O lines (T1 – T18) as digital input or output, on both Basic and Advanced (except T16 and T17 on Advanced as they are DAC output only)
So attaching Switches in Flowcode V5.4 should work.
Did you create your project as a “MIAC System” ?
Perhaps you could send a program sample?
Regards,
Leigh

thusharag
Flowcode v5 User
Posts: 42
Joined: Wed Jun 22, 2011 10:42 am
Has thanked: 7 times
Been thanked: 3 times
Contact:

Re: MIAC Expansion modules.

Postby thusharag » Fri Dec 07, 2012 1:24 pm

Dear Leighm,

I have attached the program. yes im using fowcode5.4. the simulation is working correctly. but modules are not working. in normal input low situation all he inputs shows as 1. when i connect +5 to a T input is shows zero (0). but it remains on zero when even i remove the +5. complicated actions.
So please check the arrached program with a hardware system.

thanks

thushara.
Attachments
Flowcode-EXPANSION TEST.fcf
(19.64 KiB) Downloaded 400 times
Thanks & Regards,
Thushara Goonathilake.

User avatar
LeighM
Matrix Staff
Posts: 1888
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 445 times
Been thanked: 640 times
Contact:

Re: MIAC Expansion modules.

Postby LeighM » Fri Dec 07, 2012 2:13 pm

Hi Thushara,
Thanks for the Flowcode, it works for me.
Just a couple of things to check:
1) Is the CAN connection OK? (Although I know that you are very familiar with CAN so a problem here is unlikely)
2) The Terminal inputs are high impedance and do not have any pull-ups. So if you are using switches on these inputs then you will need to add your own pull-up resistors. (Although you said you are connecting to 0v and 5v, so this probably not an issue either)
I have added a flashing LED to your program, that will at least test that the MIAC is communicating with the Basic Module.
Can you try this and see if the Basic Module LED flashes?
Thanks
Leigh
Attachments
Flowcode-EXPANSION TEST.fcf
(19.87 KiB) Downloaded 392 times

thusharag
Flowcode v5 User
Posts: 42
Joined: Wed Jun 22, 2011 10:42 am
Has thanked: 7 times
Been thanked: 3 times
Contact:

Re: MIAC Expansion modules.

Postby thusharag » Sun Dec 09, 2012 5:24 am

Dear Leighm,

Thanks for the reply. yes. the led is flashing. CAN is working and then the connections also ok. But when T1 is open MIAC shows 1 and zero time to time on T1 chanel. but it must be remain on zero, no? then I measure the voltage of T1 with zero then it is 2V. when i connect ZEro voltage terminal with T1 MIAC shows continous Zero. I dont know why the T inputs have around 2V when they are in open cct condition. Please let me know why this happens and how can we solve this.
Regards,

thushara
Thanks & Regards,
Thushara Goonathilake.

thusharag
Flowcode v5 User
Posts: 42
Joined: Wed Jun 22, 2011 10:42 am
Has thanked: 7 times
Been thanked: 3 times
Contact:

Re: MIAC Expansion modules.

Postby thusharag » Sun Dec 09, 2012 5:55 am

Dear Leighm,

I have 4 expansion modules (2 basic and 2 advance) , but all are giving same results. So better if you can check this in your Lab practically. because the simulation is working well and the issue comes when playing with hardwares.

Thanks a lot,

thushara
Thanks & Regards,
Thushara Goonathilake.

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

Re: MIAC Expansion modules.

Postby medelec35 » Sun Dec 09, 2012 11:28 am

Hi thushara,

If you are using a switch on an input, and when switch is open you want to read 0, then a pull down resistor (connected to i/p & 0V) must be connected to that and every other single input before power is applied.

What value pull-up/pull-down resistor are you using?

Is it possible to post a circuit diagram of your setup?

If you measure voltages on the i/p with no pull-down (or pull-up if you want a closed switch to give a 0 instead of a 1) then you could get wrong results.
Nothing connected to any input (e.g just a switch witch is open) is always a bad thing and will give unpredictable results.

If you measure 2V then inputs can't be connected to 0V or pull down resistor since it they were you would measure 0V instead of 2V
This 2V should not be allowed to occur (again used pull-up or pull-down resistors)
Have a look at the specifications on the expansion data sheet:
Expansion Specifications1.png
Expansion Specifications1.png (44.44 KiB) Viewed 9080 times

On page 19 it states logic 1 has to be higher than 4V.
Logic 0 has to be less then 1V

If you have not got enough pull down resistors, then to test the inputs, connect all of them (that your using) up to either +5V (labeled out) or 0V depending if you require a high or low i/p.
If done this way, be very careful. You do not want to set any of the inputs to an output by mistake, if the input is shorted to 0v or +5V

I have got a basic and advance expansion and they are a great piece of kits!

I will connect them both up and see if it all works for me, and will post findings a bit later.

Martin
These users thanked the author medelec35 for the post (total 2):
LeighM (Mon Dec 10, 2012 9:49 am) • thusharag (Thu Dec 20, 2012 3:26 am)
Rating: 10.53%
 
Martin

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

User avatar
LeighM
Matrix Staff
Posts: 1888
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 445 times
Been thanked: 640 times
Contact:

Re: MIAC Expansion modules.

Postby LeighM » Mon Dec 10, 2012 10:16 am

Hi Thushara
Just to confirm what Martin said,
When set as inputs, the Terminals are very high impedance so will nominally float to some mid voltage value. That will give un-predictable results as a binary input.
You will need to arrange your external circuitry to set the required voltage.
So if your switch is connected to 0v you will need a pull-up resistor to 5v, for example 10k.
Regards
Leigh
Attachments
MIAC Exp Switches.jpg
MIAC Exp Switches.jpg (12.66 KiB) Viewed 8940 times
These users thanked the author LeighM for the post:
medelec35 (Thu Dec 20, 2012 8:48 am)
Rating: 5.26%
 

thusharag
Flowcode v5 User
Posts: 42
Joined: Wed Jun 22, 2011 10:42 am
Has thanked: 7 times
Been thanked: 3 times
Contact:

Re: MIAC Expansion modules.

Postby thusharag » Mon Oct 27, 2014 9:26 am

Hi,
After for a long i came back design a project with MIAC Expansions again. But i'm having a doubt about the way a program runs in a MIAC System. What is the flow of reading the status of a TTL input or the value in an ADC channel in an expansion module? Is the expansion module sending the data continuously to its Master MIAC to read the incoming CANbus when required? OR does the MAster miac call the expansion module and get the data when need ?
Please clarify this.

Thanks

Thushara.
Thanks & Regards,
Thushara Goonathilake.

User avatar
LeighM
Matrix Staff
Posts: 1888
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 445 times
Been thanked: 640 times
Contact:

Re: MIAC Expansion modules.

Postby LeighM » Mon Nov 03, 2014 10:01 am

Hi Thushara,

The expansion modules only send data in response to a request from the master MIAC.
So when you call a macro to get the value, ADC or digital input, it sends a CAN message to the module, which then replies with the requested information.

Hope that helps.
Regards,
Leigh