Differences
This shows you the differences between two versions of the page.
en:software:qview:qview_6:qcl_library:dw13modbus [2017/02/24 16:18] – created qem103 | en:software:qview:qview_6:qcl_library:dw13modbus [2019/08/29 17:01] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== DW13Modbus ====== | ||
+ | |||
+ | **D = **// | ||
+ | |||
+ | **W = **//Writing functions// | ||
+ | |||
+ | The DW13Modbus function manages the interchange via MODBUS protocoll among any apparatus that acts as a Master and Qmove (Slave).\\ | ||
+ | In particular the function sorts an array (named " | ||
+ | For the use of the function is __mandatory__ set the 2 value on the " | ||
+ | |||
+ | ===== IMPLEMENTATION ===== | ||
+ | |||
+ | **DW13Modbus (Modbus, aswBuffer, slrdelay, gbWriteRead, | ||
+ | |||
+ | Parameters: | ||
+ | |||
+ | ^IN/ | ||
+ | | IN | INTDEVICE | ||
+ | | IN | ARRSYS / ARRGBL | ||
+ | | IN | SYSTEM | ||
+ | | OUT | GLOBAL | ||
+ | | OUT | SYSTEM | ||
+ | |||
+ | ==== Error ==== | ||
+ | |||
+ | After calling the function if there are any errors the error variable having the following values:\\ | ||
+ | 0 - No error\\ | ||
+ | 1 - " | ||
+ | 2 - Address exceeds the Buffer size\\ | ||
+ | 3 - The number of word be written exceeds the Buffer size\\ | ||
+ | 4 - Address <= 0\\ | ||
+ | 5 - Number of word writing <= 0 | ||
+ | |||
+ | === Example 1 === | ||
+ | |||
+ | (Without the " | ||
+ | |||
+ | //TASK_00// | ||
+ | <code QCL> | ||
+ | Modbus: | ||
+ | Modbus: | ||
+ | Modbus: | ||
+ | Modbus: | ||
+ | Modbus: | ||
+ | Modbus: | ||
+ | Modbus: | ||
+ | Modbus: | ||
+ | OPENCOM Modbus | ||
+ | WAIT Modbus: | ||
+ | |||
+ | slrdelay = 0 | ||
+ | MAIN: | ||
+ | |||
+ | DW13Modbus (Modbus, aswBuffer, slrdelay, gbWriteRead, | ||
+ | IF NOT sbError | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | ELSE | ||
+ | | ||
+ | ENDIF | ||
+ | END | ||
+ | </ | ||
+ | |||
+ | === Example 2 === | ||
+ | |||
+ | (With the " | ||
+ | |||
+ | //TASK_00// | ||
+ | <code QCL> | ||
+ | Modbus: | ||
+ | Modbus: | ||
+ | Modbus: | ||
+ | Modbus: | ||
+ | Modbus: | ||
+ | Modbus: | ||
+ | Modbus: | ||
+ | Modbus: | ||
+ | OPENCOM Modbus | ||
+ | WAIT Modbus: | ||
+ | |||
+ | slrdelay = 0 | ||
+ | |||
+ | MAIN: | ||
+ | |||
+ | | ||
+ | |||
+ | IF NOT sbError | ||
+ | IF (gbWriteRead EQ 1) | ||
+ | ;-- Reading Master --------- | ||
+ | | ||
+ | | ||
+ | ENDIF | ||
+ | IF (gbWriteRead EQ 2) | ||
+ | ;-- Writing Master --------- | ||
+ | | ||
+ | | ||
+ | ENDIF | ||
+ | ELSE | ||
+ | | ||
+ | ENDIF | ||
+ | END | ||
+ | </ | ||
+ | |||
+ | === Note === | ||
+ | |||
+ | *The " gbWriteRead" | ||
+ | |||
+ | === Limits === | ||
+ | |||
+ | The restriction on the number of variables that you can exchange is as follows | ||
+ | * Most readable/ | ||