EasyManua.ls Logo

Nidec SM-Applications Series - Page 92

Nidec SM-Applications Series
132 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
92 SM-Applications Modules & Motion Processors User Guide
Issue Number: 4
Below is an example of a simple UDFB that adds two numbers and scales by a pre-
defined amount (0.5):
(Output%) = _simplefb(Input1%, Input2%) {
// Initialization code:
Scale% = 500 // initialise a local variable
FBbody
// main body code:
Output% = Input1% + Input2% * Scale% / 1000
}

Table of Contents

Related product manuals