Download CAN-CBM-DP - esd electronics, Inc.
Transcript
Page Mode 6.5 Using the Page Mode with FBs and DBs The previous chapter has described the principal function of the Page Mode and the assignment of pages to show the functionality. The product package of the gateway includes function blocks and data blocks as source codes, which you should include in your PLC program, if you wanted to use the Page Mode. 6.5.1 Function Block FB 2: Configuration and Data Exchange By means of function block FB2 all configurations and data transfers of the Page Mode can be executed. The types of data blocks which are used by FB2 will be shown in the following example call. Calling FB2 (example): CALL FB 2 , DB102 FREIGABE :=#BIT1 WRITE_ADDRESS :=#WRITE_ADDRESS WRITE_CONFIG_DB:=#WRITE_CONFIG_DB WRITE_DB :=#WRITE_DB READ_ADDRESS :=#READ_ADDRESS READ_CONFIG_DB :=#READ_CONFIG_DB READ_DB :=#READ_DB RET_VALUE :=#t016 Explanation of data blocks and parameters: Data block/parameter For a detailed description refer to page Function FREIGABE Enable after setup via page 0 and 1. 55 WRITE_ADDRESS Start address of the first output segment. 55 WRITE_CONFIG_DB Data block to define the Tx-identifiers. 55 WRITE_DB Data block to write the output data. 59 READ_ADDRESS Start address of the first input segment. 56 READ_CONFIG_DB Data block to define the Rx-identifiers. 57 READ_DB Data block to read the input data. 61 RET_VALUE Message about the handling of the present page. 62 Table 6.5.1: Function of data blocks used by FB2 54 CAN-CBM-DP Software Manual Rev. 2.0