Thread Content
This post was last edited by dennyshen2549 on 2017-3-14 at 17:37. As a Siemens communication module, CP341 can function as a MODBUS MASTER for communication. It has been maintained before but not configured. During debugging, I encountered a problem: when it operates as the master station and the command data block is configured for transmission, communication works normally. However, if it is found that the number of registers available for reading is insufficient and more registers need to be added by modifying the count in the existing data block, after transmission, the number of registers remains unchanged – in other words, the modification does not take effect. Even deleting the transmission DB block online doesn’t help; a new transmission DB block must be created. Once created, it cannot be uploaded online immediately and will only become effective after all blocks have been uploaded (which causes the CPU to shut down and restart). I’m not sure if I made some mistake somewhere; I hope experts can give me some guidance
That’s a great question you asked! I remember it seems like I need to download it again! Since downloading the hardware configuration is involved, the CPU prompts to restart!
It depends on whether your CP341 uses a module for Modbus communication; if such a module is used, adjusting the parameters should suffice. If you’ve written your own Modbus master program, it’s harder to say
There are dogs involved, and the MODBUS standard is also used for sending and receiving data; I thought that the sending module could be modified, but in reality it’s not possible – I don’t understand why
It’s simple and easy then~~ If there’s no issue with the program, just power off the CPU and restart it; using the dog version remains very stable
Turning off the power and restarting doesn’t help. Strangely enough, it’s not possible to modify the DB block; even if changes are made, downloading them doesn’t work either – the situation remains the same. Creating a new send block also doesn’t help when done offline; all blocks need to be downloaded in order for it to work. I’m not sure what the reason is
I don’t know how you changed the quantity in the DB? Actually, the simplest way is to use VAT to modify the values in the DB online, without any need to download anything. If you are changing the initial values in the DB, then you must execute an initialization command (to update the initial values to the actual values) before the changes can take effect; otherwise, the download will be pointless
Siemens hates MODBUS; it promotes Profibus instead. If you want to use Siemens for MODBUS, you have to buy its proprietary equipment, which costs nearly 10,000 yuan. To use MODBUS with a Siemens system, one or several S7 200xp units are connected to the system; the 200 series can communicate via DP or MPI with the Siemens system, at a speed of 12 M. The 200 series can also communicate with other MODBUS devices, either in a master or slave role. A single S7 200xp costs a little over a thousand yuan, and no additional hardware is required. We often use this type of configuration.
Yes! ! ! Only a native of this country could come up with such an estimation method! I guess Siemens’ officials would be speechless after hearing this! Two thousand yuan can solve a major problem worth tens of thousands!
As the data in the DB block increases, the data size of the pins in the transmission block also needs to be modified