Home/Limit switches

General discussion of the MCP motion controller product line
Joe
Posts: 15
Joined: Fri Dec 23, 2016 1:00 am

Home/Limit switches

Postby Joe » Tue Mar 14, 2017 2:22 pm

Let*s start the new discussion section ;-)

Do the MCP controllers support two switches (home and limit) per motor?

User avatar
IMC Support
Posts: 696
Joined: Thu Feb 26, 2015 9:45 pm

Re: Home/Limit switches

Postby IMC Support » Thu Mar 16, 2017 8:29 am

You can easily setup two limit switches(home and limit for example) using 2 of the DIN I/O pins per motor. Setup can be done through the Ion Motion setup application. Each pin can have a min and.or max action setting. The levels at which the actions trigger are also programmable.

In the ion motion software select the DIN pin you will use for an action(for a Limit in this example). If the limit will trigger when pulled low, set the Min Action to the specific Limiting action(M# Forward Limit or M# Reverse Limit). Then set the Min setting to 2048. This will set the trigger voltage at approx 2.5v. if you want a lower trigger point lower the Min setting.

For homing(where the home switch also acts like a limit switch) you want to set both a Min and Max action. In a case where the Home switch is active low set the Min action like a Limit and the Min setting to around 2048(or lower) as with the Limit switch. Then set a Max action of LoadHome and set the LoadHome value to the home position(usually 0). Then set the Max setting to 2048 or greater. When the home switch is triggered(goes low) the motor will be stopped(because of the limit function). Then when the motor is moved out of the home sensor the LoadHome function will execute giving a precise home position at the switch trigger point.

Note this is only one example of how homing can be done. There are many different ways to configure homing(foward, backward, forward with an offset, backwards with an offset etc...).

biznasty123
Posts: 3
Joined: Tue Apr 04, 2017 2:07 pm

Re: Home/Limit switches

Postby biznasty123 » Mon Apr 10, 2017 2:04 pm

Why set it equal to 2048?

Also, how can we print to the terminal to check for sure if the signal is triggering?

User avatar
IMC Support
Posts: 696
Joined: Thu Feb 26, 2015 9:45 pm

Re: Home/Limit switches

Postby IMC Support » Fri Apr 14, 2017 10:41 am

I said 2048 because that will cover both analog and digital inputs. Analog inputs will have a value of around 3471 for a 5v input(the Analog input signal range is 0v to 5.9v mapped to 0 to 4095). While digital inputs will have a value of 4095 for any high signal. 2048 is the middle point of any Analog/Digital pins value, so it is a safe trigger point. The MaxAction looks at the Max vlue setting and if the pin value is higher than the Max value it will trigger the specified action(in this case a limit function).

To print to the terminal window you can use the "puts" command. puts 0,["data"] will print "data" to the terminal window via the USB port connection.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest

cron