beautypg.com

Crv_last_x function, Dint_to_dword function, Dint_to_real function – Delta RMC151 User Manual

Page 368: Crv_last_x( id ), Dint_to_real( a ), Dint_to_dword( a )

background image

RMC70/150 and RMCTools User Manual

program that uses the CRV_INTERP_Y function to continuously update a variable. The

user program should then gear the velocity axis to that variable with the Gear Velocity

command.


If the specified curve Id does not exist or the Options value is invalid, the task will fault.

The task will also fault if Options is zero and the X value is not within the range of x-

values of the curve. When the task faults, 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.
The CRV_FIRST_X, CRV_LAST_X, AND CRV_EXISTS functions are useful in conjunction

with the curve interpolation functions.

Examples

MyReal := CRV_INTERP_Y(3, 5.67, 8);

5.14.2.15. CRV_LAST_X Function

CRV_LAST_X (id)
Returns the x value for the last point in the curve with the specified id.

Parameters

id (DINT)
The curve ID.

Return Value

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

Remarks

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.16. DINT_TO_DWORD Function

DINT_TO_DWORD(a)
Converts a DINT to a DWORD. a and its bit order remains the same, but type is changed to

DWORD.

Parameters

a (DINT)

Return Value

Returns a DWORD.

5.14.2.17. DINT_TO_REAL Function

348

Delta Computer Systems, Inc.

This manual is related to the following products: