Crv_first_x function, Crv_interp functions, Curve – Delta RMC151 User Manual

Page 366: Interpolation functions, Crv_interp_y, Curve interpolations functions, Crv_first_x( id ), Crv_interp_y( id, x, Options] ), Crv_interp_v( id, x

Advertising
background image

RMC70/150 and RMCTools User Manual

5.14.2.13. CRV_FIRST_X Function

CRV_FIRST_X (id)
Returns the x value for the first point in the curve with the specified id.

Parameters

id (DINT)
The curve ID.

Return Value

Returns the first X value of the curve as a REAL.

Remarks

This is useful for moving to the first point of a curve before sending the Curve Start (86)

or Curve Start Advanced (88) command.
If the specified curve id does not exist, the task will fault. An error will be logged in the

Event Log and the user program running on the task will stop. Use the CRV_EXISTS

function to programmatically check if the curve id exists.

5.14.2.14. CRV_INTERP Functions

CRV_INTERP_Y (id, x, [options])
CRV_INTERP_V (id, x,
[options])
CRV_INTERP_A (id, x,
[options])
Interpolates the curve with the specified id at the given value of x, and returns the Y value,

velocity (V), or acceleration (A) at that point in the curve.

Parameters

Id (DINT)

The curve identification number.
X (REAL)

The x value of the specified curve.
Options (DINT)

Optional parameter. Defines the behavior of the function when x is beyond the endpoints

of the specified curve. The following options exist, similar to the Endpoint Behavior

Options of the Curve Start Advanced (88) command:

Option

Description

Image

0: Fault

(default)

If x is beyond the

endpoints of the

curve, a runtime

error will occur,

and the task will

stop running.

346

Delta Computer Systems, Inc.

Advertising
This manual is related to the following products: