
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
}
Содержание Digitax ST Indexer
Страница 131: ......
Страница 132: ...0471 0062 04...