LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing two mechanical stop end switches for a movement on the x-axis of a microscope stage.

Hey members,

I need help implementing stop end switches for a project. I was wondering how I can implement two stop end switches for a microscope stage moving on the x-axis. I am working on a project to automate this microscope using a motor. I need the motor to continuously move and when hits the stop end switch, it immediately changes the direction. I was also wondering what is the most efficient way to communicate the stop end switches using a pcb board NI-6251. Let me know if I am missing any information.

 

Thank you,

Ash  

0 Kudos
Message 1 of 7
(901 Views)

Please provide more information on the existing setup,

  • Motor - model & manufacturer, link to datasheet/manual
  • Wiring between motor and NI-6251
  • Anything else connected to NI-6251
  • How is the motor currently controlled using NI-6251?
  • What is your larger goal? - have you figured out everything else?
Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 7
(870 Views)

Well a stop switch is just a Boolean that is either on or off, right?

 

Your NI-6251 has 24 DIO ports, use two of them one for each switch.

 

Initialize two DIO ports as inputs with internal Pull-up resistors.

 

Connect one side of switch to the DIO input.

 

Then connect the other side of the switch to ground.

 

When the switches are open the input of the DIO will be high because of the internal pull-up.

 

When a switch is closed the input of the DIO will be low and the switch is pulling it to ground.

 

Now is where it gets tough(er) you have to decide on how to monitor the DIO's for switch closure.

 

If you are moving in small increments, it could be as easy as:

  1. Move forward
  2. Check DIO (sw1)
  3. If DIO = High go to 1
  4. Move backwards
  5. Check DIO (sw2)
  6. If DIO = High goto 4
  7. Goto 1

Of course that is way over simplified but I think you get the idea...

 

A better way would be to create a separate process that constantly reads the DIO ports and uses a Messenger Channel or perhaps a Notifier to signal a motor control process to change directions or stop.

========================
=== Engineer Ambiguously ===
========================
Message 3 of 7
(858 Views)

Power supply voltage DC: 6.5V-27V

 

The output voltage of our power supply is between 0V-18V

 

Our motor is 12V, 1.2A, 50 rp

The model is 7A/160W dual DC motor drive

 

We are using a motor driver connected to a NI-6251 board. The motor is currently controlled using Ni-daqmx digital signal. 

The larger goal is to automate the motor to move a microscope stage with two stop end switches connected to the two ends of the x-axis plane. So far We figured out how to change the direction of the motor. Next, step is to implement the stop end switches which is what I am stuck on.

 

Thank you,

Ashiful

0 Kudos
Message 4 of 7
(816 Views)

Thank you sir, I think this will be a useful guide for me to continue on my research.

0 Kudos
Message 5 of 7
(815 Views)

In the case of end-stop switches, given your powerful motor, the reaction time has to be split second. If the motor controller is not directly monitoring the switch states and you might potentially damage your x-y stage or overload the motor.

 

In the case of a stepper motor, you can do this end-stop switch state check before sending a step signal, but given your motor is a geared DC motor, you've to check if your motor driver has such end-stop switch control for a faster response.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 6 of 7
(806 Views)

You are completely missing the basic premise of a stop end switch.

 

The switch should be installed so that it interrupts motor drive power.  No software involved.  It is advisable to MONITOR the switch state in your program but, the hardware must fail safe itself.  

 

Now, some systems also employ a software drive limit that depends on position feedback and prevents the endstop from actually being reached but, that is not a end stop.


"Should be" isn't "Is" -Jay
Message 7 of 7
(801 Views)