Search the Community

Showing results for tags 'max485'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Found 1 result

  1. Hello everyone! Briefly introduction, I would like to communicate and test the following hardwares: 1- Omron CP1E (using an Option Port CP1W-CIF11) ; and 2- Arduino Nano using MAX485 RS485 transceiver. The CP1E will operate in "Modbus-RTU simple master" as illustrated in image 01. The arduino will be in slave mode address 1 and the library used is "SimpleModbus NG" ( ). Taking the sample in official manual ( ) , pages 248-253 in the "CP1E CPU Unit Software User's Manual" (Image 04) describes a sample communication to an "Inverter Slave". I want to use the Arduino Slave as the Inverter Slave just to be sure that all previous steps are correct. Therefore, I would like to know: 1- As illustrated in Image 02, Am I missing any resistors? 2- Should I connect the GND to the FG? 3- In this scenario, the DIP switch setup should be as illustrated in image 03? Only DIP4 is OFF. 4- Can I test it just forcing A641.00 and checking the DM Area Data, as shown in Image 05? The code used in it is the following: // Wiring: Arduino and MAX485 // RX0 - RO // TX1 - DI // D2 - DE/RE #include "SimpleModbusSlave.h" enum { REGISTER_0, REGISTER_1, REGISTER_2, REGISTER_3, REGISTER_4, REGISTER_5, REGISTER_6, REGISTER_7, REGISTER_8, TOTAL_REGS_SIZE }; unsigned int holdingRegs[TOTAL_REGS_SIZE] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 }; void setup() { modbus_configure(&Serial, 9600, SERIAL_8N1, 1, 2, TOTAL_REGS_SIZE, holdingRegs); } void loop() { modbus_update(); }   Any answer can be helpful. Thank you for your time!   Regards, Jose.