LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why only one toggle when using periodic breakpoints (7350)?

Greetings -
 
I am trying to use periodic breakpoints to trigger a data acquisition (e.g., every 150 counts of a rotary encoder I want to save a data point).  I have configured a breakpoint value and a modulus value, and am running in periodic mode with output set to "toggle breakpoint value."
 
When I execute a move, the breakpoint toggles when it reaches the initial breakpoint value (offset), but there is no response at each subsequent period.
 
For example:
Breakpoint=200
Modulus=150
move from 0 to 4000
I would expect to see the breakpoint output toggle at 200, 350, 500, 650, etc
But I only see the output go high at 200 and stay high.
 
I am using a PXI-7350 in periodic mode (NOT modulus mode).  Running LVRT7.1 targeted to an 8187RT controller.
Please see attached.  Thanks.
 
 
__________________________________
Laine
0 Kudos
Message 1 of 11
(3,866 Views)

Laine,

Your breakpoints on the breakpoint line of the motion controller should be occurring from the way your VI is setup. You will not be able to "poll" the number of breakpoints occurred through the 'Read per Axis Status.vi' with Periodic breakpoints - it will only give a true once the first breakpoint has been reached - it will not change state for any subsequent breakpoints in this mode.

If you attach a scope or multi-meter (if you are going slow enough) to the proper breakpoint line, you will see that the line is toggling as expected.

0 Kudos
Message 2 of 11
(3,858 Views)
Good then I'm not crazy.
 
So I would like to create an event structure for "Breakpoint1 ValueHasChanged" which contains the data logging routine.  Is there a way to directly read this output state, or internally route the signal to a digital input?  Or will it be necessary to physically hardwire the output back to a trigger input or general-purpose IO line?
 
I am not using a DAQ card; I have a digital measurement probe set up as an additional axis on the motion card so I can just read its encoder value.
 
Also, is the EVENT the best way to handle this collection?  Could I wire the breakpoint output of the motion axis to the trigger input of the probe axis and utilize low-level HSC (high-speed capture)?  How would code for this this look?
 
 
Thanks
__________________________________
Laine
0 Kudos
Message 3 of 11
(3,848 Views)
Hey Laine,
 
To answer your questions, there is not a way to directly read the output state of the breakpoint, nor a way to internally route the signal. There is no trigger input on the Motion Controllers, but you could wire it into a general purpose IO line. But this is not the best way to do this. Events is not the best way to handle the collection of your data. If your digital measurement probe has some kind of trigger input, you could wire the breakpoint output to that so that the probe could send the data to the motion board. But if you are wanting to try and wire the breakpoint to the other axis, again, there is no triggering capablities on the Motion Controllers. Also, there is no way to know when the breakpoints are occurring unless you poll the value which is not the best method.
 
So, the Best method that I would suggest is to purchase a DAQ card (low cost M-Series should be sufficient) that has external scan clock capablities. The reason I would suggest this is because you could use the breakpoint output and send that signal into the DAQ board as a trigger and then start collecting data from your probe when the DAQ board is triggered (i.e. when the breakpoint value has changed). Also, I mentioned external scan clock capability because there is example code already that does this. I have attached the example below called RTSI with DAQmx (breakpoint-external scan clock).vi.
 
I hope this answers your question. Please let me know if you have any further questions or concerns. Thanks, and have a great day.
 
Regards,
DJ L.
0 Kudos
Message 4 of 11
(3,839 Views)

Thanks for your response DJ.

This is from the 7350 manual:

(p. 5-1): "The motion I/O connectors contain all the signals required to control up to eight axes of servo and stepper motion, including the following features:
• Motor command analog and stepper outputs
• Encoder feedback inputs
• Forward, home, and reverse limit inputs
• Breakpoint outputs
• Trigger inputs

(p.5-10): "Trigger Input <1..8>—When enabled, an active transition on a high-speed position capture input causes instantaneous position capture of the corresponding encoder count value. You can use this high-speed position capture functionality for applications ranging from simple position tagging of sensor data to complex camming systems with advance/retard positioning and registration."

So maybe this trigger capability just exists on the 7350.  Now is there a way to internally route the Breakpoint output of one axis to the Trigger input of another axis, or would a physical loopback connector be required?

 

Thanks,

Laine

__________________________________
Laine
0 Kudos
Message 5 of 11
(3,831 Views)
Hey Laine,
 
I think I now understand what you are trying to do. I just want to verify that I know what you are trying to do. So here is how I see it. On your axis 1 (or whichever, but let's say axis 1 for explanation purposes) you will connect your motor, your feedback encoder, and will have a breakpoint as an output. And now you want to connect your axis 1 breakpoint output to your axis 2 trigger input and use it as a semi High Speed Capture (HSC) function. Now when the axis 1 breakpoint output triggers, it will trigger the axis 2 HSC which will read the value of the encoder on axis 2. But instead of having an actual encoder on the axis 2 encoder input, you will be hooking up your digital measurement probe. So when the HSC is tripped, it will capture the axis 2 "encoder" value, which will really be the measurement from your digital probe.
 
After thinking about this for a while, you should be able to do this under a couple of conditions. First, you will have to physically wire the axis 1 breakpoint output to the axis 2 HSC (trigger) input. The other thing that you will want to make sure of is that the signal that is coming from your digital measurement probe is a signal similar to an encoder. The axis 2 encoder input can only read encoder type of signals because it was designed to read encoders, like it says in the following: "causes instantaneous 'position' capture of the corresponding encoder count value." This should work as long as your digital probe can be read by the encoder input. You still do not want to use an Event Structure to do this in your code. You will want to have your code set up both the Breakpoints on axis 1 and the High Speed Capture on axis 2. I would suggest that you somehow combine the two example programs "Breakpoint Output.VI" and the "High-Speed Input Capture.VI". These can be found in the NI Example Finder, Browse by Directory Structure, Motion folder, Flexmotion folder, Miscellaneous.llb folder. These two examples will get you started and on your way.
 
I hope we are on the same page now. And I hope this new answer is what you were looking for. Please keep us up to date on how things are going and turn out, as this seems like a very useful application. Thanks for being patient, and let me know if you have any further questions.
 
Regards,
DJ L.
0 Kudos
Message 6 of 11
(3,816 Views)

Excellent, yes this is what I would like to do.  My Axis 2 probe is essentially a quadrature encoder, so that should be no problem. 

Just to be clear - a physical jumper wire from Breakpoint1 to Trigger2 is required (no internal signal routing is available)?

I find 3 undesirable phenomena in this setup:

1) I set up Axis 1 breakpoints as Periodic at 100 counts.  The help documentation says that signals will begin 100 counts after the "initial encoder value", but when I initialize the board and make a move in MAX, there are no signals.  I first have to enable the breakpoint output programatically in LabVIEW.  Is there a way to do this in MAX automatically upon initialization?  I think it has to be done in a LabVIEW program.

2) If I scope the breakpoint output with no jumper, output level is 5V.  After the jumper to Trigger2 is connected, output drops to exactly 2V.  Is there a problem?  If I distribute the signal to Trigger2 and Trigger3 (my ultimate goal), the level is still 2V.

3) I have the Breakpoint Mode set to Toggle (square wave output) and Trigger Input set to Rising Edge.  This should initiate a HSC every other breakpoint.  However, I find that the Axis 2 Status HSC bit is high: a)constantly when breakpoint output is high and b)almost constantly (98%) when breakpoint output is low.  Is there trigger level or deadband setting?  I am essentially using the "Continuous HSC.vi" to monitor it.  Today I will look for the "High-Speed Input Capture.VI" to see if that makes a difference.

Thanks for your time and input!

 

__________________________________
Laine
0 Kudos
Message 7 of 11
(3,812 Views)

I tried this using the shipping example, modified to monitor then reenable the HSC when a signal is found (see attached).  I am still getting the same result.

As a matter of fact, if I target my PXI real-time target and poll the HSC status, the HSC input is ALWAYS read high, no matter what the status of the actual Trigger2 input (low, high or transitioning up/down).  (The 98% in my previous post was targeting WindowsXPOS).

I am sure I'm making a simple mistake, but can't discover it!

 

Thanks.

__________________________________
Laine
0 Kudos
Message 8 of 11
(3,808 Views)
Hey Laine,
 
I have attached below a block diagram on basically how you can set up this breakpoint and high-speed capture combination. I have not tested the code thoroughly yet, but this should give you an idea on how to combine the two examples I mentioned before. Keep me updated on how things are going. Thanks.
 
Regards,
DJ L.
0 Kudos
Message 9 of 11
(3,779 Views)

Hi DJ -

Thanks, this looks great.  However, I have 2 issues preventing satisfactory operation now:

1) The motor drive is causing a high-frequency noise signal on the order of 8V @ 30kHz on the breakpoint output line.  I have this routed directly to a trigger input, but there is a 30 kHz rising edge, so that is what is triggering the line.  I have ordered a hardware filter to reduce this noise.

2) Aside from the noise, if I scope the breakpoint output without connecting it, it is switching 5V at each breakpoint OK.  However, if I connect the breakpoint output to a separate axis trigger input, the switching level immediately drops to 2V.  This will not be high enough to actuate the HSC after I eliminate the noise. 

Issue 2 is what most concerns me.  Any idea why the voltage level would drop to 40% by connecting the breakpoint and trigger?  Is is something in the way these are set up in MAX (open collector v. totem pole)?

 

Thanks

__________________________________
Laine
0 Kudos
Message 10 of 11
(3,774 Views)