how can we use the com mod mast function block?
can you share the details of how a com mod mast function block works and the parameters required?
Voted best answer
COM_COM: BYTE := 1; (* port of the CPU/device, that you configured for modbus communication *)
COM_SLAVE: BYTE := 1; (* Slave Address of your slave *)
COM_TIMEOUT: WORD := 1000;
COM_FCT_WORDS: BYTE := 3;
COM_ADDR_READ_WORDS: WORD := 0; (* Start address of the register that you want to read - from slave's mapping *)
COM_READ_WORDS_NB: WORD := 10; (* number of registers that you want to read)
READ_WORDS: ARRAY [1..10] OF WORD; (* here you place the result of reading *)
Answers
Hi,
I will recommend you to use F1 - help function for the block and read the description of the parameters. It is very well documented in OnLine help. Also you can find many examples in AKS and web.
In case you have some specific question, which is not clear, you can ask here.
I will recommend you to use F1 - help function for the block and read the description of the parameters. It is very well documented in OnLine help. Also you can find many examples in AKS and web.
In case you have some specific question, which is not clear, you can ask here.
Add new comment