CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

use Master & Slave on the same MCU !?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
walat



Joined: 13 Mar 2013
Posts: 5

View user's profile Send private message Visit poster's website

use Master & Slave on the same MCU !?
PostPosted: Fri Mar 06, 2020 3:42 am     Reply with quote

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: 19545

View user's profile Send private message

PostPosted: Fri Mar 06, 2020 6:24 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group