View previous topic :: View next topic |
Author |
Message |
walat
Joined: 13 Mar 2013 Posts: 5
|
use Master & Slave on the same MCU !? |
Posted: Fri Mar 06, 2020 3:42 am |
|
|
Hi,
I'm using 18f87k22 with CCS-C V5.051
I used UART1 as Modbus Slave and successfully communicate with Modbus_Poll.exe PC Software.
Then I comment UART1 and slave codes and used UART2 as Modbus Master and successfully communicate with ModBus_Slave.exe PC Software.
But,
When I try to use the same MCU as a Master and Slave, I got these errors.
So is it impossible to use both Master & Slave on the same MCU?
Best Regards.
--------------------------------------------------
C:\Program Files (x86)\PICC\drivers\modbus_phy_layer_rtu.c:25:1: Info#300 More info: Timer 1 tick time is 128,00 us
C:\UserData\Valsmatik_B-Plus\VM_BP.X\VMBP.h:133:24: Warning#225 Duplicate #define
C:\UserData\Valsmatik_B-Plus\VM_BP.X\VMBP.h:134:31: Warning#225 Duplicate #define
C:\UserData\Valsmatik_B-Plus\VM_BP.X\VMBP.h:135:41: Warning#225 Duplicate #define
C:\UserData\Valsmatik_B-Plus\VM_BP.X\VMBP.h:136:31: Warning#225 Duplicate #define
C:\UserData\Valsmatik_B-Plus\VM_BP.X\VMBP.h:137:33: Warning#225 Duplicate #define
C:\UserData\Valsmatik_B-Plus\VM_BP.X\VMBP.h:138:33: Warning#225 Duplicate #define
C:\UserData\Valsmatik_B-Plus\VM_BP.X\VMBP.h:139:37: Warning#225 Duplicate #define
C:\UserData\Valsmatik_B-Plus\VM_BP.X\VMBP.h:140:37: Warning#225 Duplicate #define
C:\UserData\Valsmatik_B-Plus\VM_BP.X\VMBP.h:142:26: Warning#225 Duplicate #define
C:\UserData\Valsmatik_B-Plus\VM_BP.X\mcp41010.c:24:1: Warning#208 Function not void and does not return a value set_pot
C:\UserData\Valsmatik_B-Plus\VM_BP.X\mcp41010.c:45:1: Warning#208 Function not void and does not return a value shutdown_pot
C:\UserData\Valsmatik_B-Plus\VM_BP.X\VMBP_SubFunctions.c:20:54: Error#12 Undefined identifier -- modbus_read_holding_registers_rsp
C:\UserData\Valsmatik_B-Plus\VM_BP.X\VMBP_SubFunctions.c:25:56: Error#12 Undefined identifier -- modbus_write_multiple_registers_rsp
2 Errors, 11 Warnings. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19535
|
|
Posted: Fri Mar 06, 2020 6:24 am |
|
|
No, not at all impossible, but as standard the drivers are only written to
support one or the other. You would have to tweak them to do this.
Using two busses I presume, since 'Modbus' is not a multi-master bus.
Only Modbus TCP supports multi master. Modbus ASCII and RTU don't. |
|
|
|