On board programming

Hi,
I made an application using c for a PCI 7350 which was not on-board. Now I want to modify it so that the application can run on-board.
I am calling all the load parametrs and flex_start functions in subroutines like doMove1(u8& boardID) etc.
void __cdecl main(void){
i32 status=0;
u8 boardID=1; //PCI 7350 board
u8 program=1;
if(status == NIMC_noError){
//Begin on board program storage
status = flex_begin_store (boardID, program);
printf("\n On Board Program Storage started\n");
if (status == NIMC_noError){
//Do the sequential moves
status = doMove1(boardID); if (status)ErrorHandler((u16)status, 0, 0); //do Move1 loads the trajectory parameters and runs the "flex_start" function.
status = doMove2(boardID); if (status)ErrorHandler((u16)status, 0, 0); //do Move2 loads the trajectory parameters and runs the "flex_start" function.
//////End program storage/////
if(status == NIMC_noError){
status = flex_end_store (boardID, program );
printf("\n On Board Program Storage completed\n");
/////Now run the stored program/////
if(status == NIMC_noError){
status = flex_run_prog(boardID, program);
printf("\n Running the program now\n");
printf("\n\nFinished.\n");
}//end main
The program compiles, but when I try to run it, I only see 1 printf, that is the first printf statement  " On Board Program Storage started". I want to be sure that the program will be able to make all the moves on-board. Can someone please comment or suggest any improvements?
Thanks,
-Karan

The reason why you see only the first printf is the fact that you have used functions in your onboard program that can't be downloaded to the board. This will result in errors that cause the other printf calls not to execute. In fact you are just allowed to use NI Motion function calls inbetween the start and the end of the storage of your onboard program. You can't use subroutines, C-loops and so on.
The reason for this is the way onboard programs work. After calling flex_begin_store() the CPU on the board doesn't execute the motion commands that are sent to the board immediately but stores them in memory to execute them later. It can't store subroutines or structures. Please refer to the shipping onboard programming examples to find out how to program loops and so on in an onboard program.
Why do you want to run the moves in an onboard program? The onboard CPU is just a little 20 MHz µController with low performance. Many years ago it helped to remove some load from the host CPU but with current PC CPUs this doesn't make any sense anymore. Today onboard programs are typically used to monitor some critical conditions (e. g. forces) and react independently from the PC/Windows. You shouldn't use them to execute the motion task as there are really almost no benefits. It's just a bit more complicated...
Best regards,
Jochen

Similar Messages

  • How can I run a Buffered Contour repeatitively using on-board programming?

    I have a 400 point countour move that I would like to run for 100,000 cycles. How can I use the buffer over and over again using on-board programming?

    Jed,
    Thank you for your comments. They did not however answer the question. I am asking about buffered contour moves. Most of the Onboard programming examples and tutorials deal with repeating of linear or circular moves. I have been using the onboard programming for some time, and have set up and run may Onboard DO WHILE Loop programs with good result. I have however been having some problems with the onboard progams running reliably for more than 1000+ cycles. I have spoken with Mr. Austin about this, but we have not been able to resolve this problem.
    The buffered contouring options are of great value to me, as I would eventually like to follow some pretty complex pathways that require changes in velocity as well. I can sucessfully complete one cycle o
    f buffered contouring, but that is all. I can repeat this cycle, but only by buffering two or more iterations of these points. Each time you write to the buffer, it is memory intensive, and the HELP files urge you to not write to buffers too much while motion is in progress. I have worked with the vi that lets you progressively write a large number of points to a small buffer and a while loop. This works great for a few cycles, but I would like to preform 100,000 cycles. I am having trouble getting the same type of vs to work for this many points.
    I would like to know if it is possible to have a buffer that you can read from recursively, without it being erased after it is read.
    If not, how would it be best to approach this problem?
    Thanks,
    John

  • How to clear on board a on-board program in 7344?

    Hi
    Is there any way to know whether any on board program is running in 7344. How to clear an on-board program in 7344.
    Further how to output a value using the DAC in 7344 on board programming.

    Yes, if you use the Read Program Status function either in LabVIEW, C++, or VB it will return the status of any program you have onboard. Another easy way to find out if an onboard program is running is to use Measurement and Automation Explorer. Under the section called Device Resources for the 7344, you will find a Tab called On-Board Memory Manager. Clicking on this tab will show you which programs are running and if you right clikc on them you can start them stop them, delete them from RAM or save them to flash. You can also use the Object Memory Management function to Save, delete or free a program from RAM programmatically.

  • How can I incorporate software limit detection into my on board program such that it will halt the program if a software limit is detected?

    I want to have the software limits halt the on board program if they are tripped. How can I do this?

    See duplicate post :
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HFORCEKWTID=87118:5&HOID=50650000000800000074BC0000&HExpertOnly=&UCATEGORY_0=_14_&UCATEGORY_S=0

  • On board program does not run the motor to new positions yet commands to state of digital I/O in the same program line.

    I am controlling a stepper motor position via a PIC-7342 board. This part of the program has worked in the past. I have another program that does almost the same thing and it works as always. 
    The program sets the speed and accelerations, then sets a position and tell the motor to run to the position. Then it sets a communication bit through the MCS register. Then it sets a new position and command the motor to run to the new position. It then delays a short time and commands an output to turn on. Then it sets a new position and commands the motor to run to the new position. After each command to run there is a wait for motion complete.  The code used to work correctly.  Now the motor runs to the first position and proceeds no further.  The finial position is sometimes a couple of steps past the setpoint, which is very unusual. The digital output is fired like the second position has been reached, even though the motor has not moved to the position. The actual path for the motor is clear, so there is not mechanical reason for the problem.  How would you troubleshoot an on board program?

    ITElearner,
    What has changed since you last ran your system?  Can you move the motor in Measurement & automation explorer?  Are you getting any errors?  Is this program written in LabVIEW?  You may also find the following useful:
    Configuring a Motion Control System
    http://zone.ni.com/devzone/cda/tut/p/id/3126
    Configure and Test a Stepper Motor
    http://digital.ni.com/public.nsf/allkb/9675C83F037​811F68625727C0002A4A5?OpenDocument
    Regards,
    Sam K
    Applications Engineer
    National Instruments
    www.ni.com/support

  • I have a large number of photos on 1.44MB discs. Quicktime flags the files as corrupted but they open with the on board program.  The file has a quicktime xtension.

    I have a lot of 1.44MB disks with pictures.  When I tried to open them I got a message that Quick Time was not properly installed. I uninstalled and reinstalled Quick Time as instructed.  Then I got a message that Windows Picture and Fax Viewer was missing,  I corrected that and now get a message that the picture files are corrupted.  But if I use the program that is on the disk, the pictures appear just fine.  Any thoughts as to what is going on?  The file structure on the disc identifies the pictures with a Quick Time icon and as Type PICT.  The properties window shows a .pic extension.  Any thoughts on how I can get this to open in an XP Pro or Vista PC?

    Use the on board viewer program to export the file as bitmap or jpg and work with that.

  • Am i Eligible for the logic board program?

    My ibook falls into the serial numbers that are eligible for the free repair. But this line taken from the website confused me a little.
    How long is the Expanded iBook Logic Board Repair Extension Program available?
    The program covers affected iBooks for three years after the first retail sale of the unit or until 18 March 2005, whichever provides longer coverage for you. Apple will continue to evaluate the repair data and will provide further repair extensions as needed.
    I purchased my ibook in the year 2002, am i stil eligible for the program? There are some lines on my ibook screen.

    I purchased my ibook in the year 2002, am i stil eligible for the program?
    Not officially, no. A few people have successfully approached Apple Customer Relations, requesting that they make an exception to the three-year rule. However, I would suppose that the farther removed the iBook is from the three years, the less likely they are to make an exception to the rule. Yours is five years old (or nearly so). You can try calling Apple and requesting to speak with Customer Relations and ask them to make an exception to the three-year rule, but I wouldn't hold out a lot of hope. That said, you have nothing to lose by asking.
    Good luck.

  • Regarding SPATRAN 3E FPGA BOARD PROGRAM ERROR

    Hello Sir,
                      I am new to FPGA family.I have SPATRAN 3E FPGA board and i am trying to simulate for an OR gate of 3 input and one output. While I am siluating the code, the following error is showing.
    FATAL_ERROR:Simulator:Fuse.cpp:500:1.133 - Failed to compile generated C file isim/precompiled.exe.sim/ieee/p_2592010699.c Process will terminate. For technical support on this issue, please open a WebCase with this project attached at http://www.xilinx.com/support.
    Please help me to solve this problem.

    Hello,
    Can you check the OS (Operating System) from the released notes of ISE (UG631)  which you are using if  its supported?
    Also Try Cleanup the project files in ISE before running simulation:
    Thanks,
    Syed
    Please mark the Answer as "Accept as solution" if the information provided is helpful.
    Give Kudos to a post which you think is helpful and reply oriented.
    -----------------------------------------------------------------------------------------------

  • ***PLEASE REPLY***problem with toshiba bulletin board

    Hi...
    I posted a thread ...and for five days no one reply to me ?
    please help me with this:
    The icons in toshiba bulletin board program disappear ??
    I uninstall it but it's same
    you can see it:
    http://yfrog.com/4rproblemep
    my regards

    you actually need to put back the icons dragging them back to the bulletin.
    Toshiba Bulletin Board
    oOo
    *Read EULA before installing any software.

  • Icons disappear in toshiba bulletin board ???

    Hi...
    The icons in toshiba bulletin board program disappear ??
    I uninstall it but it's same
    you can see it:
    http://yfrog.com/4rproblemep
    please help
    my regards

    etacarinae wrote:
    on the far right towards the bottom of your computer there is a tab hit the tab a window will open that says customize settings op-en this setting and it will bring you to settings for icons. Hit the tab for turning on all settings for icons
    I mean these icons... it's disappear
    http://yfrog.com/0827275159p0827275159p

  • Can I be directed to a SIMPLE example of one value being passed FROM Labview TO an Onboard program to be used as a "Var Vector" in a sub.vi in the onboard program?

    I can find all kinds of examples of data FROM OnBoard Programs to the host but not the other way round. Specifically how do I get the variable into a memory location that the Board will read?

    Thank you for contacting National Instruments. There are a few LabVIEW examples that ship with NI-Motion that use the Load Constant to Variable VI to store data from your application to the onboard memory of the motion controller device. If you open NI Example Finder (click on Find Examples.. under the Help menu) and choose to browse by Directory Structure, then you can navigate to the Motion >> FlexMotion >> Onboard folder. The "Sequence of One-Axis Moves" and "Repeated Move in a FOR Loop" examples both store information in variables on the motion controller, whose data is later used in the onboard program. From your post, this is what it sounds like you are interested in doing.
    Also, if you are new to onboard programming and want to look over some more informa
    tion on developing those applications then I would recommend starting with Chapter 15 of the NI-Motion User Manual, where it discusses onboard programming. You can also reference the following website and the links on it:
    On-board Programming in FlexMotion
    http://zone.ni.com/devzone/conceptd.nsf/webmain/F03A6DE53C744C5886256857005ECDBE?opendocument
    If this does not answer your question or if I miss understand your request then please let us know.
    Regards,
    Michael
    Applications Engineer
    National Instruments

  • Is it possible to use the case structure in on board progamming

    Hi
    I want to load a certain value in a variable in on board programming based on the encoder. How to implement this in 7344.

    No, it is not possible to use the labVIEW case structure in an onboard program. However, it is possible to implement the functionality you need by using a label, a jump to label on condition function and two on board variables. What you need to do is read the value of your encoder into one of the variables, once this value is in there you will use some of the variable arithmetic functions to compare its value to a value you would load into the second on board variable (the most common way is to use the subtract variables function). The result of the last varible operation is the used inside the jump to label on condition fucntion to evaluate the condition and to jump or not jump back to the label dependding on the result. For a much clearer explanation of this functional
    ity as well as some example code, please refer to chapter 15 of the following manual:
    http://digital.ni.com/manuals.nsf/websearch/EB609F​9BA065EA7A86256D350060C9A0?OpenDocument&node=13210​0_US

  • PCI-7390 Onboard program error-70022

    I am using a PCI-7390 Motion card. When I run the example vi  “Onboard Program.vi” an error happened. It shows that
    “   Error-70022 happened in Begin Program Storage.flx  
          Possible reason
          Motion:This command is not supported by this controller or orperating system.”
    Dosen't the PCI-7390 controller support Onboard Program ?
    May there something worry with the setting?
     Thanks!
    Solved!
    Go to Solution.

    This example is not supported on NI 7330 or NI PCI-7390 controllers." but7340 and7350 support On-board program。

  • I can't load onboard program

    I want to create digital pulses without any axis control by using on-board programming of PXI-7350 motion controller. I need it because i can't do it by using DAQ, or by using digital output of PXI-7350 without on-board programming. the main reason that i need PWM for 6 different motors, my controller has only 2. I need 0.9-2.1 ms of pulse duration to control servo motor, but limitation of non on-board program it 2.2 ms. i'm not sure that if i will use on-board program it will be faster, but i have problem that i can't load this program in board. I used standard example "digital pulses (1HZ) in a DO_WHILE LOOP.vi", and deleted all vi's about axis operation. of course this is not PWM, i just wanted to check that I have any signal on my digital output by using on-board program. I need just turn on and turn off after 1 ms one digital output in while loop, by using on-board programming.
    At this moment when i run code nothing is happen,  there are no any signal on digital output and no error. Here is 2 case of code, but both are unsuccessful. May be somebody know what can i improve? If anybody can help me... thank you a lot!!

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99385)

  • Large blotch appears on display

    I have an iBook G4 which Apple replaced for my G3. The G3 was part of the extended logic board program; they tried to repair it three times but were unsuccessful. I've had the G4 for less than 12 months. I've never had a problem with it until today. When I turned it on there was a very large blotch of black and white in a free-form design covering 3/4 of the screen. I tried to restart, then shut-down and restart but nothing got rid of the blotch. I can see the outline of the blotch when the machine is off. Is this another logic board problem? I wrote to Apple and am waiting for their reply.

    Not correct. You received a refurbished G4 as a
    replacement for your G3.
    Hmmm... Interesting concept. According to the
    Customer Relations person who sent it to me
    originally, it was new. According to the Customer
    Service guy my husband talked to today, the only way
    to get a refurbished laptop is to actually purchase
    one (and he said he couldn't look it up by the S/N
    because once it was registered to us, all he sees is
    our info.)
    Then this is an even better reason to buy from Apple. In the electronics industry, it is standard practice to use refurbished components when repairing/replacing defective one. That is what is written on the fine print of every RMA I have ever seen. That doesn't mean they can't or won't give you new parts for a repair or replacement. It just means if they do, they are going above and beyond anyone else. And, for what it's worth, I would take a refurbished Apple over a new PC any day. I am a proud owner of an Apple-refurbished iPod - works like a charm.
    This whole discussion has re-lit the fire in my
    husband and he is pushing the issue now (it is still
    under warranty until Oct.)
    Squeaky wheel gets the grease. I just think that if you had one of the lemon G3 that had to be repaired 6 times and finally replaced, and the replacement screen cracked, they should give you a new machine. You've suffered enough.
    We would have purchased what instead?? A PC? And
    perhaps run Windows on it?? (excuse me while I pick
    myself up off the floor from laughing.)
    That's nice to hear to a change. Usually it is something like - "I bought this first generation MacBook and it has a funny noise and runs hot. I'm filing a class-action lawsuit!!!"

Maybe you are looking for

  • How to stop DW putting Dependant Files?

    I've never found a solution that's worked for me, but today I've had enough! I have setup site access via RDS, so there is no 'Local' set of files, I'm working directly on our development server and saving the files, and testing changes immediately.

  • Is loading a as2 swf into my as3 flash site the problem here?

    My question is listed on another board here, but I am too inexperienced to understand how to fix my issue: http://forums.adobe.com/message/5045059#5045059 I went on flashkit.com and a member there immediately said that it "sounds like the problem is

  • How do i enlarge my web page

    The content on my webpage is too small for me to see. I know that on Internet Explorer, they have a tool to enlarge everything on the page. I can't find one for firefox though

  • No sound in left headphone

    This is my first macbook. Mine is Macbook Pro 13" 2.3 GHz Intel Core i5. OS is OS X 10.6.8. It was ok at the beginning but there has been no sound in left headphone from the some point which I don't remember. My headphone works fine when it is connec

  • Settings on ipod touch

    In my ipod touch i cant get into settings its liked blocked i need some one to answer fast my i pod touch is not jailbroken