MIAC Expansion modules.

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

Moderators: Benj, Mods

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

MIAC Expansion modules.

Post by thusharag »

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: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: MIAC Expansion modules.

Post by LeighM »

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: 46
Joined: Wed Jun 22, 2011 10:42 am
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: MIAC Expansion modules.

Post by thusharag »

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 593 times
Thanks & Regards,
Thushara Goonathilake.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: MIAC Expansion modules.

Post by LeighM »

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

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

Re: MIAC Expansion modules.

Post by thusharag »

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: 46
Joined: Wed Jun 22, 2011 10:42 am
Has thanked: 9 times
Been thanked: 3 times
Contact:

Re: MIAC Expansion modules.

Post by thusharag »

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.

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: MIAC Expansion modules.

Post by medelec35 »

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
(44.44 KiB) Downloaded 9920 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
Martin

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: MIAC Expansion modules.

Post by LeighM »

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

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

Re: MIAC Expansion modules.

Post by thusharag »

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: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: MIAC Expansion modules.

Post by LeighM »

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

Post Reply