Large curves are curves that are too large to be written at once in their entirety to the variable table. Creating large curves via the Variable Table involves writing the curve data in parts to the variable table and issuing the Curve Add (82) command after each part until all the curve data has been written. This topic describes how to add curves in parts. Only one partial curve download can be in progress at a time.
See the Curve Storage Capacity topic for limits on how many curves can be added to the RMC.
Partial Curve Formats
Downloading a curve in parts requires using one of the Partial Curve formats:
Partial Curve - Evenly-Spaced Points (20)
Partial Curve - Variable-Spaced Points (21)
Partial Curve - Advanced Points (22)
These formats are based on the single curve formats (see the Curve Data Formats topic), but with modifications to support downloading in parts. The following chart summarizes the partial curve formats:
Offset |
Register |
Description |
0 |
Status |
The value of this register when passed to the Curve Add (82) command is ignored, but after the Curve Add (82) command is issued, the value of this register will be controlled by the RMC and indicates the status of processing the curve. The user should monitor this to determine when the command is finished processing the curve data. The following values are defined: It is good practice to set this value to zero when writing the data. |
1 |
Format |
One of the following: 20 - Evenly-Spaced Points 21 - Variable-Spaced Points 22 - Advanced Points This value must be the same for each part. |
2 |
PartOffset |
Offset of this part of the whole curve (in registers). This value will change for each part. |
3 |
PartLength |
Number of curve data registers in this part, not including the 5 header registers with offsets 0-4. Typically, this value is the same for each part except the last. |
4 |
TotalLength |
Total length of curve data (sum of all parts). This is the length of the corresponding single curve format, but with the Status and Format registers stripped off. This value must be the same for each part. |
5..5+(L-1) |
PartData |
Segment of the curve data in the respective single curve format. The curve data here consists of the corresponding single curve format, but with the Status and Format registers stripped off. |
Downloading Partial Curves to the RMC
To download a large curve to the RMC, repeat the following procedure until all the data has been downloaded:
Write the data part to the RMC.
Registers 0 - 4 of the Partial Curve Format listed above must always be included in each write. The actual data of the curve is included in registers 5 and on. The data in the registers 5 and on is the data of the corresponding single curve format, but with the Status and Format registers stripped off.
Issue the Curve Add (82) command.
Wait for the Curve Status register to be 2 or 3.
The value 2 indicates
that the part was successfully added.
The value 3 indicates that the entire curve has now been successfully added.
Example
Suppose that the user wants to download a 2500-point curve through a block of 512 consecutive variables starting at %MD58.0 (Variable #512). The user decides to use the evenly-spaced format, and interpolation option of zero (0) for Zero-Velocity Endpoints, initial X0 of 0, and an X interval of 0.1.
Since the user chose the Evenly-Spaced Points format, the curve data itself will require a total of 2504 registers, consisting of the items below. Notice that this is the Single Curve Evenly-Spaced Points format, but with the Status and Format registers stripped off.
Curve Data |
|
Offset |
Data Item |
0 |
Point Count |
1 |
Interpolation Options |
2 |
X0 |
3 |
X interval |
4 |
Y0 |
5 |
Y1 |
: |
: |
2503 |
Y2499 |
The Variable Table area the user decided to use for the curve parts is 512 registers in length, which means the user can write up to 512 registers each time. The header for the Partial Curve format has 5 registers, which must be included in each part. Therefore, the user can write up to 507 Curve Data registers per part.
Here is the sequence of parts that would add this curve to the curve store, with each part being written and then submitted with a Curve Add (82) command:
Part |
Address |
Number Regs written to in Variable Table |
PartOffset |
PartLength |
TotalLength |
#1 |
%MD58.0 |
512 |
0 |
507 |
2504 |
#2 |
%MD58.0 |
512 |
507 |
507 |
2504 |
#3 |
%MD58.0 |
512 |
1014 |
507 |
2504 |
#4 |
%MD58.0 |
512 |
1521 |
507 |
2504 |
#5 |
%MD58.0 |
481 |
2028 |
476 |
2504 |
The user would send this curve to the RMC by completing the following sequences of writes to the Variable Table:
Note: This is very tedious to do directly from RMCTools, but you may need to when you are first trying it.
Part #1:
Variable |
Data |
Description |
Curve Data Offset |
512 |
0 |
Status = 0 |
- |
513 |
20 |
Format = 20 |
- |
514 |
0 |
Part Offset = 0 |
- |
515 |
507 |
Part Length = 507* |
- |
516 |
2504 |
Total Length = 2504 |
- |
517 |
2500 |
Point Count = 2500 |
0 |
518 |
0 |
Interpolation Options = 0 |
1 |
519 |
0 |
X0 = 0 |
2 |
520 |
0.1 |
X interval = 0.1 |
3 |
521 |
Y0 |
Y0 |
4 |
522 |
Y1 |
Y1 |
5 |
: |
: |
: |
: |
1023 |
Y502 |
Y502 |
506 |
*This number includes the four parameters and the number of points in this curve.
After writing part #1 and issuing the Curve Add command, the user should wait for the Curve Status at Variable 512 to become 2 (if you are looking in RMCTools, make sure to look in the Monitor tab of the Variable Table Editor), indicating that the RMC has completed processing the part.
Part #2
Variable |
Data |
Description |
Curve Data Offset |
512 |
0 |
Status = 0 |
- |
513 |
20 |
Format = 20 |
- |
514 |
507 |
Part Offset = 507 |
- |
515 |
507 |
Part Length = 507 |
- |
516 |
2504 |
Total Length = 2504 |
- |
517 |
Y503 |
Y503 |
507 |
: |
: |
: |
: |
1023 |
Y1009 |
Y1009 |
1013 |
After writing part #2 and issuing the Curve Add command, the user should wait for the Curve Status at Variable 512 to become 2 (if you are looking in RMCTools, make sure to look in the Monitor tab of the Variable Table Editor), indicating that the RMC has completed processing the part.
Part #3
Variable |
Data |
Description |
Curve Data Offset |
512 |
0 |
Status = 0 |
- |
513 |
20 |
Format = 20 |
- |
514 |
1014 |
Part Offset = 1014 |
- |
515 |
507 |
Part Length = 507 |
- |
516 |
2504 |
Total Length = 2504 |
- |
517 |
Y1010 |
Y1010 |
1014 |
: |
: |
: |
: |
1023 |
Y1516 |
Y1516 |
1520 |
After writing part #3 and issuing the Curve Add command, the user should wait for the Curve Status at Variable 512 to become 2 (if you are looking in RMCTools, make sure to look in the Monitor tab of the Variable Table Editor), indicating that the RMC has completed processing the part.
Part #4
Variable |
Data |
Description |
Curve Data Offset |
512 |
0 |
Status = 0 |
- |
513 |
20 |
Format = 20 |
- |
514 |
1521 |
Part Offset = 1521 |
- |
515 |
507 |
Part Length = 507 |
- |
516 |
2504 |
Total Length = 2504 |
- |
517 |
Y1517 |
Y1517 |
1521 |
: |
: |
: |
: |
1023 |
Y2023 |
Y2023 |
2027 |
After writing part #4 and issuing the Curve Add command, the user should wait for the Curve Status at Variable 512 to become 2 (if you are looking in RMCTools, make sure to look in the Monitor tab of the Variable Table Editor), indicating that the RMC has completed processing the part.
Part #5
Variable |
Data |
Description |
Curve Data Offset |
512 |
0 |
Status = 0 |
- |
513 |
20 |
Format = 20 |
- |
514 |
2028 |
Part Offset = 2028 |
- |
515 |
476 |
Part Length = 476 |
- |
516 |
2504 |
Total Length = 2504 |
- |
517 |
Y2024 |
Y2024 |
2028 |
: |
: |
: |
: |
992 |
Y2499 |
Y2499 |
2503 |
After writing part #5 and issuing the Curve Add command, the user should wait for the Curve Status at Variable 512 to become 3 (if you are looking in RMCTools, make sure to look in the Monitor tab of the Variable Table Editor), indicating that the RMC has completed processing the curve. Notice that the curve data point numbering begins with 0, and therefore 2499 is the last point of the 2500-point curve.
See Also
Curves Overview | Curve Data Formats | Curve Add (82)
Copyright © 2024 Delta Computer Systems, Inc. dba Delta Motion