Kuhnke Electronics Instruction Manual

Kuhnke Electronics Instruction Manual Kuhnke Electronics Instruction Manual

17.02.2013 Views

Function Libraries To install a timer task: To install a program module as a timer task you must run the following code to identify the module: Index := INDEXOF (module name); Afterwards, the following function just needs to be run once in order to set up the timer task: CREATE_TIMERTASK ( Index, TTIME ); FUNCTION CREATE_TIMERTASK : UINT VAR_INPUT NPOU_IDparam: WORD; TTIME: WORD; END_VAR VAR END_VAR The value returned by the function tells you something about the thread status. Value returned Explanation 0 not installed, no timer task available 1 installed as timer task #1 Ventura Remote PLC only supports a single timer task at a time. To modify "TTIME" you must first uninstall the timer task, set it to another value, and reinstall it. 76 E 700 GB

To uninstall a timer task: Function Libraries To no longer use a program module as a timer task, run the following code: Index := INDEXOF (module name); Afterwards, run the following module in order to uninstall the timer task: DELETE_TIMERTASK ( Index ); FUNCTION DECREATE_TIMERTASK : BOOL VAR_INPUT NPOU_IDparam: WORD; END_VAR VAR END_VAR 77

Function Libraries<br />

To install a timer task:<br />

To install a program module as a timer task you must run<br />

the following code to identify the module:<br />

Index := INDEXOF (module name);<br />

Afterwards, the following function just needs to be run<br />

once in order to set up the timer task:<br />

CREATE_TIMERTASK ( Index, TTIME );<br />

FUNCTION CREATE_TIMERTASK : UINT<br />

VAR_INPUT<br />

NPOU_IDparam: WORD;<br />

TTIME: WORD;<br />

END_VAR<br />

VAR<br />

END_VAR<br />

The value returned by the function tells you something<br />

about the thread status.<br />

Value returned Explanation<br />

0 not installed, no timer task available<br />

1 installed as timer task #1<br />

Ventura Remote PLC only supports a single timer task at<br />

a time.<br />

To modify "TTIME" you must first uninstall the timer task,<br />

set it to another value, and reinstall it.<br />

76 E 700 GB

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!