flex_begin_store

NI-Motion Functions

flex_begin_store

Device Compatibility

Device Compatibility
7330
N
7340
Y
7344
Y
7350
Y
7390
N
NI SoftMotion Controller for CANopen—Xenus
N
NI SoftMotion Controller for CANopen—Accelnet
N

Begin Program Storage

Usage

status = flex_begin_store(u8 boardID, u8 program);

Purpose

Begins a program storage session.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)
program u8 program number

Parameter Discussion

program is the program number. Valid program numbers are 0x01 through 0xFF (1 through 255).

Using This Function

This function initiates program storage in RAM. After they are begun, all subsequent functions are stored in an object buffer and not executed until the program is run with the Run Program function. This memory storage continues until you execute the End Program Storage function. You can store only one program at a time.

The size and number of programs is completely flexible. It is ultimately limited by the 32 total memory objects in the Object Registry or by total available memory, whichever is reached first.

The 7350 and 7340 have the following onboard memory:

RAM ROM
7340 1 64k sector 2 64k sectors
7350 2 64k sectors 4 64k sectors

You can run programs from either RAM or ROM, but you cannot split programs between the two, and you cannot split programs between the two 64 KB ROM sectors. With an average command size of 10 bytes, a single program can be as large as 6,400 commands. For example, the 7350 and 7340 controllers can execute 10 programs simultaneously, five from RAM and five from ROM, with each program up to 1,280 commands long.

Note  Attempting to store more than 32 programs generates an error. Similarly, an error is generated if you run out of memory during program storage. Both of these cases are extremely unlikely.

Do not store onboard programs while other NI-Motion functions are running. Doing so can result in incorrect program storage.

If you run two onboard program functions with the same program number, the second onboard program overrides the first. No error message is generated when this happens.