Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

High speed capture using flex functions returns null vector

Solved!
Go to solution

Hi,

 

We have a 7350 controller and UMI-7774 driving a stepper motor via P70530 driver. We use a single axis, axis 1, which is configured as a stepper motor with feedback, and 10000 steps/rev. Our motor performs a contoured move and during this move we need to read the encoder position with about 2000 Hz resolution. I can move the motor using MAX or flex functions, I can also read the encoder position using MAX, but can't perform the high speed read.

 

Questions:

1. How can I configure the high speed read for 2000 Hz?

The function flex_configure_buffer(boardID, bufferInEnc, axis, NIMC_HS_CAPTURE_READBACK, contMoveBufSize, totalPoints, NIMC_FALSE, requiredInterval, out actualInterval)

returns error -70078 (Invalid parameter) when I pass it a required interval of less than 10ms.   

 

2. How can I read the high speed buffer data?

Even when buffer is configured with the interval of 10ms, the function flex_read_buffer_rtn(boardID, bufferInEnc, backlog, out retVector) returns no data (retVector = null).

 

Please find attached a sample vs2008 solution demonstrating the problem.

0 Kudos
Message 1 of 4
(3,665 Views)

Hi hyspec,

 

Have you checked out the resources here and here? Both of those guys have had the same problem and it was resolved by updating motion and the motion firmware.

Stephen Meserve
National Instruments
0 Kudos
Message 2 of 4
(3,645 Views)

Hi Stephen,

 

Thank you for your quick reply. I checked again my 7350 card firmware, the status display indicates the latest version of the firmware is installed. The versions are: 68331 Firmware version 7.40.3003, DSP Firmware version 7.31.3002, FPGA1 Firmware version 7.10.3001. I downloaded and installed the latest version of NI Motion from your website, NI Motion 8.01f. When I run my application after this update, the same problem is still present, I can't read the high speed buffered position data.

 

I had a look at two resources that you quoted.

 

1. This post lists continuous_hsc.vi as a labview example for high speed capture. When I execute this vi the motor moves to a Target Position, but Captured Position stays 0. Which is essentially the same as what I'm reading using the C functions.

 

2. The second post you listed describes the steps to produce a contour move, and does not mention anything about high speed capture. The contour moves are working fine in my program using C functions. My only issue is that the high speed position capture does not work on my system.

 

Could you please answer my original question regarding the flex_configure_buffer() function, and clarify what should be the requiredInterval parameter value in order to read encoder position at 2000 Hz?

 

Could you please try to run my sample application and let me know what should I correct to get a read of high speed position buffer?

0 Kudos
Message 3 of 4
(3,633 Views)
Solution
Accepted by topic author hyspec

Hi Stephen,

 

The issue is now resolved, the problem was in the trigger condition.

 

It seems that the requiredInterval parameter in function flex_configure_buffer() function call is ignored, since I'm getting data at about 0.5 ms interval even though the requiredInterval and actualInterval are both 10ms.

 

Thanks for your help.

Message 4 of 4
(3,617 Views)