Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Using joystick with onboard program : problem with limit switch

I am using a PXI-7354 with onboard programming.
 
We would like to be able to move a machine using joysticks even when no reference has been done.
 
We are facing a problem with onboard programming : the program halts when a limit switch is reached.
Thus it is not possible to move reverse.
 
Is there a way to allow moving reverse direction from the limit with onboard programming ?

Jean-Louis SCHRICKE
CTA - Certified TestStand Architect (2008 - 2022)
CTD - Certified TestStand Developer (2004 & 2007)
CLD - Certified LabVIEW Developer (2003 & 2005)

0 Kudos
Message 1 of 15
(5,877 Views)

Hi
Did you see this document:
http://zone.ni.com/devzone/cda/tut/p/id/3161

Kamal
NIF

0 Kudos
Message 2 of 15
(5,851 Views)
A second onboard program could wait (Wait on Conidion) for Limit Input Active. It could move reverse, start the first program and wait again.
I hope this works but I do not know because I can not test it.
0 Kudos
Message 3 of 15
(5,843 Views)

Thank you Kamal.

We already knew this document. At the end of this document it is written :

5. If a limit switch is reached while running the onboard program, the program pauses and must be restarted. Avoid moving the stage to its extreme ranges of motion.

==> I think that it could be interresting that NI improves this example with consideration of the axis limit switches...

We are trying to add another program which will not be onboard but in the RT controller. This program will move the axis reverse and will restart the onbaord program. We are afraid that if this program is also onboard it will also be stopped if an axis limit is reached.

Thank you to both of us for your answer.

Jean-Louis SCHRICKE
CTA - Certified TestStand Architect (2008 - 2022)
CTD - Certified TestStand Developer (2004 & 2007)
CLD - Certified LabVIEW Developer (2003 & 2005)

0 Kudos
Message 4 of 15
(5,833 Views)
Jean-Louis,

this sounds a bit like a misunderstanding. The program stops when a limit switch is hit because it is designed to do this. In general neither programs that run on the host nor programs that run onboard are stopped when a limit switch is hit except they are intended to do so.

Of course limit switches require special attention and you should handle error and status information accordingly. If you do this there shouldn't be a need for a second program that restarts the onboard program.

Best regards,

Jochen Klier
National Instruments Germany
0 Kudos
Message 5 of 15
(5,830 Views)

Jochen,

What you said is exectly what we would like to do.

Is there any way to avoid stopping the onboard program when a limit swith is reached ?

Regards,

Jean-Louis SCHRICKE
CTA - Certified TestStand Architect (2008 - 2022)
CTD - Certified TestStand Developer (2004 & 2007)
CLD - Certified LabVIEW Developer (2003 & 2005)

0 Kudos
Message 6 of 15
(5,826 Views)
An onboard program stops on an error. When you give a command to move in the direction of the limit switch you reached, this is an error. The second onboard program should not stop because there was no error.
Your program should not stop any more when you disable the limit switches. But you should check the Limit Inputs yourself, probably in the onboard program.
 
Regards
shb
0 Kudos
Message 7 of 15
(5,821 Views)

Jochen,

It is not possible for us right now to make some complementary tests since the PXI chassis is at the customer place.
 
We are surprised by your suggestion.
As we remember, when the axis limit are disabled, the limit switch status is not returned. So how can we get manually the limit switch status by onboard program?
Could you have the possibility (or Kamal) to check this point.
 
Also, the onboard program doesn't stop because of an error but changes to pause mode because of limit reached (If a limit switch is reached while running the onboard program, the program pauses and must be restarted).
 
Could you confirm us that if we have two onboard programs, only the program who asked for the movement will be paused and the others onboard programs will still be running?
 
Thanks for your help.

Jean-Louis SCHRICKE
CTA - Certified TestStand Architect (2008 - 2022)
CTD - Certified TestStand Developer (2004 & 2007)
CLD - Certified LabVIEW Developer (2003 & 2005)

0 Kudos
Message 8 of 15
(5,814 Views)
Jean-Louis, shb

sorry, this was my mistake. Looks like I have mixed up something.
Whenever a modal error occurrs all onboard programs get paused. This is a security feature as we don't want an onboard program to be able to override a potentially critical status feedback from the board.

Thus you will have to run another program on the RT controller that checks for modal errors and reacts accordingly (e. g. move the axis back to the valid travel range as you have already suggested). The RT program won't stop when an onboard error occurrs.

Best regards,

Jochen Klier
National Instruments Germany
Message 9 of 15
(5,811 Views)
That all programs stop on a modal errer is new for me. Thanks for the information. This will help in my project.
In this case you have to restart from the runtime program.
 
The other possibility is to avoid the modal error. The error occurs when you are in the forward limit and give a command to move forward. For reverse it is the same in the other direction of course. When your program checks the Limit and does not command to move in the wrong direction, no error occurs.
 
When you disable the limit switches, no error occures no mather the direction. You are right. The limit switch status is not returned in this case. But the VI Read Motion I/O Data returns the status of the limit switch. Check the help before using it, I do not understand every detail.
 
I hope that my information is correct and understandable this time.
 
Greetings
shb
0 Kudos
Message 10 of 15
(5,807 Views)