Can I create a new serial port on the Arduino Uno to run a Simulink model in real time that also uses a serial port?
I’m attempting to run the example MODBUS RS485 Communication Between Client and Server Using Arduino Board with two Arduino Uno units. These units have only one dedicated serial port on pins 0 and 1. When I go to Monitor and Tune the Client Model, I get an error message for all 6 MODBUS blocks in the model that reads:
Error evaluating ‘InitFcn’ callback of codertarget.arduinobase.internal.arduino_ModbusRS485MasterRead block (mask) ‘arduino_modbus_client/Modbus RS485 Client Read’.
Callback string is ‘codertarget.arduinobase.conflictcheck.validateandregisterBlocks(gcbh);’
Caused by:
The SerialPin_1 ‘1’ being used by ‘arduino_modbus_client/Modbus RS485 Client Read’ is currently in use by ‘Monitor and tune over XCP on Serial’. To resolve the conflict, change the value of SerialPin_1 in ‘arduino_modbus_client/Modbus RS485 Client Read’ to an alternate valid value.
It appears that the only port the Arduino Uno has is in use by the USB interface with my desktop computer. I know that ArduinoIDE has the SoftwareSerial library addon that is supposed to allow you to assign pins to create a separate serial port, but I don’t know if a similar operation is possible in Simulink. Or perhaps I can create the new port in ArduinoIDE for use in the Simulink model. Thank you.I’m attempting to run the example MODBUS RS485 Communication Between Client and Server Using Arduino Board with two Arduino Uno units. These units have only one dedicated serial port on pins 0 and 1. When I go to Monitor and Tune the Client Model, I get an error message for all 6 MODBUS blocks in the model that reads:
Error evaluating ‘InitFcn’ callback of codertarget.arduinobase.internal.arduino_ModbusRS485MasterRead block (mask) ‘arduino_modbus_client/Modbus RS485 Client Read’.
Callback string is ‘codertarget.arduinobase.conflictcheck.validateandregisterBlocks(gcbh);’
Caused by:
The SerialPin_1 ‘1’ being used by ‘arduino_modbus_client/Modbus RS485 Client Read’ is currently in use by ‘Monitor and tune over XCP on Serial’. To resolve the conflict, change the value of SerialPin_1 in ‘arduino_modbus_client/Modbus RS485 Client Read’ to an alternate valid value.
It appears that the only port the Arduino Uno has is in use by the USB interface with my desktop computer. I know that ArduinoIDE has the SoftwareSerial library addon that is supposed to allow you to assign pins to create a separate serial port, but I don’t know if a similar operation is possible in Simulink. Or perhaps I can create the new port in ArduinoIDE for use in the Simulink model. Thank you. I’m attempting to run the example MODBUS RS485 Communication Between Client and Server Using Arduino Board with two Arduino Uno units. These units have only one dedicated serial port on pins 0 and 1. When I go to Monitor and Tune the Client Model, I get an error message for all 6 MODBUS blocks in the model that reads:
Error evaluating ‘InitFcn’ callback of codertarget.arduinobase.internal.arduino_ModbusRS485MasterRead block (mask) ‘arduino_modbus_client/Modbus RS485 Client Read’.
Callback string is ‘codertarget.arduinobase.conflictcheck.validateandregisterBlocks(gcbh);’
Caused by:
The SerialPin_1 ‘1’ being used by ‘arduino_modbus_client/Modbus RS485 Client Read’ is currently in use by ‘Monitor and tune over XCP on Serial’. To resolve the conflict, change the value of SerialPin_1 in ‘arduino_modbus_client/Modbus RS485 Client Read’ to an alternate valid value.
It appears that the only port the Arduino Uno has is in use by the USB interface with my desktop computer. I know that ArduinoIDE has the SoftwareSerial library addon that is supposed to allow you to assign pins to create a separate serial port, but I don’t know if a similar operation is possible in Simulink. Or perhaps I can create the new port in ArduinoIDE for use in the Simulink model. Thank you. arduino, serial, communication MATLAB Answers — New Questions