IEC 61131-3 C Tools User Manual


Add to my manuals
501 Pages

advertisement

IEC 61131-3 C Tools User Manual | Manualzz

IEC 61131-3 C Tools Function Specifications

installSetdbaseHandler

Install User Defined Setdbase Handler

Syntax

#include <ctools.h> void installSetdbaseHandler

(

BOOLEAN (* handler)

(

unsigned address,

int value

)

)

Description

The installSetdbaseHandler function allows an extension to be defined for the setdbase() function.

If a handler is installed, it is called by the setdbase function when one of the following conditions apply:

There is no IEC 61131-3 application downloaded, or

There is no IEC 61131-3 variable assigned to the specified Modbus address.

The function installSetdbaseHandler has one parameter: a pointer to a function to handle the setdbase extensions. See the section Setdbase Handler Function for a descripti on of the handler function and it‟s parameters. If the pointer is

NULL, no handler is installed.

The installed handler is called with a Modbus address. Linear addresses are converted to Modbus addresses before calling the handler. Use the

installDbaseHandler function to install a read access handler for the same addresses handled by the setdbase handler.

C Tools functions dbase and setdbase are used by all protocols to access

Modbus or Linear registers.

Notes

Call this function with the NULL pointer to remove the setdbase handler. This needs to be done when the application program is ended with an exit handler.

Use the installExitHandler function to install the exit handler.

If the Setdbase handler is not removed within an exit handler, it will remain installed and continue to operate until the controller power is cycled. Erasing the

C Program from the Initialize dialog will not remove the Setdbase handler. If the handler is located in a RAM-based application and left installed while a different

C application is downloaded, the original handler will be corrupted.

See Also

setdbase, installDbaseHandler

Document (Version 2.50) 5/12/2011 240 240

IEC 61131-3 C Tools Function Specifications

Example

See example for Setdbase Handler Function.

Document (Version 2.50) 5/12/2011 241 241

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

advertisement

Table of contents