Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

breakpoint max modulus only (2^14-1) not (2^15-1) as per references

Hi,

I'm using a PXI-7352 and am happily doing periodic breakpoints using C code, but when I tried to use a larger bp modulus (flec_load_bp_modulus), I get an invalid value error for any modulus value larger than 16383 ... which  == 2^14 - 1.  But the references state that the max modulus should be 2^15 - 1 (= 32767).

 

This is a bit limiting for my application as I want to use bp modulus of up to 70mm, and my encoder gives 400 cts per mm - so I need a bp modulus of 28,000.

 

Is this a bug, or documentation typo or what?

 

Regards

Richard.

 

 

 

 

0 Kudos
Message 1 of 6
(4,397 Views)

Hi RikNZ,

 

What is the error code you’re receiving? Also, what is the data representation of the variable being fed into flex_load_bp_modulus?

 

It’s likely you’ve see it, but below I’ve provided the NI-Motion manual.

http://www.ni.com/pdf/manuals/371242b.pdf

 

On page 168 there is a Periodic Breakpoint example in C code. I hope this helps!

 

- Kale

0 Kudos
Message 2 of 6
(4,379 Views)

Hi Kale,

below is a segment of my code, and the error message I get.

 

The bp modulus (nbp) is an unsigned long - which is the same as the "u32" type the fcn expects.

The fcn flex_load_bp_modulus works fine with a bp modulus less that 16384, otherwise it fails with error -70078.

 

 

From numcBasicTypes.h:

 

	typedef unsigned long u32

 2015-09-08 09_19_37-bp_modulus_error.rtf [Compatibility Mode] - Microsoft Word.png

0 Kudos
Message 3 of 6
(4,289 Views)

Hi RikNZ,

 

Thank you for the screen shot and information. Are you able to run one of the NI Motion C examples such as Periodic Breakpoint Output.c? These example can be located in NI-Motion >> Documentation >> Examples >> NI-Motion Help >> C (file location varies depending where it's been installed but for me it was C:\Program Files (x86)\National Instruments\NI-Motion\Documentation\Examples\NI-Motion Help\C).

Please let me know if you're able to run one of these examples with the value set above (2^14)-1.

 

- Kale

0 Kudos
Message 4 of 6
(4,263 Views)

Hi Kale,

 

I ran the example Periodic Breakpoint Output.c, but put a loop around the entering and setting the bp modulus so I could try several values.

 

Here is the output from 1 example.  I tried another where I entered five bp modulus values, and the fifth was 16384 - where it gave the same error as seen below.

 

The upper acceptable bp modulus valus is definately 16383, not 32767 as the documentation states.

 

Will the code be corrected?

 

 

2015-10-27 16_35_16_NI BP Example.jpg

0 Kudos
Message 5 of 6
(4,057 Views)

Hi RikNZ,

 

If you run the example without putting it in a loop does it run properly? If I understand correctly you were able to run it with 16383, but any number greater causes the error. 

 

I apologize for the inconvenience. I'll file a Corrective Action Request, but I cannot guarantee a timeline for a fix.

 

- Kale

0 Kudos
Message 6 of 6
(4,023 Views)