09-01-2015 08:16 PM
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.
09-02-2015 01:44 PM
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
09-15-2015 12:21 AM
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
09-16-2015 10:24 AM
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
10-27-2015 03:50 PM
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?
10-28-2015 08:40 AM
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