Ktstoilove, Pratik... went through your recommendation but still facing the same problem..
Thank you guys for your support..
I am still getting that weird values in modbus address 2049.
Let me tell you in breif as what i want to achieve. I have a PM564-eth-ac Plc which is to communicate with three drives using serial communication. The modbus addressing for the drives are 1797 for speed ref, 1798 for CW and 2054 for RPM monitorig. Please see the attched program to get the clear visualization.
I want to to be able to read from address 2049. Could you please modify and show it on the program so that i could get a better picture. As your recommendation, i used a separate MOD_COM_Mast for reading Address 2049. Dont know what i am missing...
Need your help.
Thanks
Answers
For 2049 you made written mistake, for defining of COM input of MOD_COM_MAST block.
Try with the attached program. I made following:
- created blocks for first slave 3
- changed cycle time to 200 ms, 60 ms seems too fast (correct, that should be fixed time)
- delete call of your program and add calling of my program from task manager
- created consequence call of all MOD_COM_MAST blocks
- clearly defined slave number, FCT, read addresses, number of words, result = words
It should work correctly (please check also HW settings of COM1 if they correspond to the defined in drives).
Then you can multiplay the same blocks for other slaves.
Please note to connect correctly EN inputs of the blocks. In this way they will act one after the other, for the time as long as they require.
You should loop all the COM_MOD Blocks. Don't use a seperate Blink block (for READ 2049). The DONE of First -> En of second -> Done of Second -> En Third -> Done of Third OR input for 15.
Fix up COM, Slave values for Read of 2049. They are shown wrong.
For Starts always use Just one block to read a value to ensure that the wiring/modbus settings/logic/timing is ok. Then keep adding more.
Add new comment