From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Check Reference after Find Reference with 9516

Solved!
Go to solution

Hi all,

 

I'm using a SoftMotion and a cRIO-9039 with some NI9516 modules to provide analog commands to some servo drives.  After homing my axes with the Find Reference Express VI (to a home switch), I'm looking for a way to check that the axes have been successfully homed so the next time the VI I'm building runs, I can skip over the homing part.  Is there a property or something I can read that can tell me that the axes have already been homed (I'm assuming the home reference is kept until a power cycle)?

 

Thanks in advance!

 

- Jay

0 Kudos
Message 1 of 6
(3,183 Views)

Hi Jay,

 

You can use the Read (Motion I/O) express VI to read the status of the home switch. Take a look at the Reference Move - Home and Index example in the NI example finder.

 

Also, if the home limit switch is active, the reference move won't actually move the motor.

Ren H.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 6
(3,094 Views)

Hi Ren,

 

Thanks for your response.

 

To be a bit clearer, I'm not trying to read the status of the home switch, I would like to avoid performing the reference move entirely if the axes have already homed since the last power cycle.  I am imagining some flag that gets set after a Find Reference move is completed indicating that the axis is homed that persists until the power is cycled.  Is there some property like this that can be checked before trying to home the axes?

 

I found this VI (Check Reference) in the NI-Motion help pages that seems to do what I want (if I'm understanding it correctly), but I can't find an equivalent way to do it in SoftMotion.

 

Thanks,

 

- Jay

0 Kudos
Message 3 of 6
(3,088 Views)

Hey Jay,

 

Gotcha! Unfortunately there isn't a property node or VI that does this. You will have to program that logic yourself.

 

For example, once you homed the motor, save the axis name to a text file on the hard drive of your cRIO. Upon startup, read the same file. 

 

 

Ren H.
Applications Engineering
National Instruments
Message 4 of 6
(3,067 Views)
Solution
Accepted by topic author jay__

Jay,

 

As Ren mentioned, there is no property in SoftMotion that natively checks if the axis has been homed since SoftMotion was started. I would recommend storing any extra configuration data such as whether or not the axis has been homed in a cluster with the axis resource. As a simple example, have a Boolean as part of the cluster with the axis, initialize the Boolean as False when the application initializes, then set it to True once your initial homing routine is complete.

 

Karl

Message 5 of 6
(3,063 Views)

Thanks for the responses and sorry about the delayed reply.  I'm a little disappointed that SoftMotion doesn't have such a property, but I guess the workarounds aren't too terrible.  I like Karl's suggestion of using a cluster to store extra configuration data with the axis resource since that save's me from having to persist something to the file system and read it back.

0 Kudos
Message 6 of 6
(3,037 Views)