Could somebody please point me in the right direction regarding a few queries i have with my first S7300 project.
Hardware comprises;
2 x 315-2DP CPU's (With software redundancy loaded)
2 x IM153-2 Modules
2 x CP341 Modules (One as Modbus Master, One as Slave)
3 x 8AI Cards
1 x 2AO Card
1 x 32DI
1 x 32DO
After wrestling with the redundancy issues, i now have that working fine. The Modbus SLAVE side of things was pretty straight forward, this was connected to a Honeywell DCS system and is communicating fine. The problem i have is with the Modbus MASTER side of things. The problem isn't really with the Modbus - i have it talking nicely to two Atlas Copco compressors acting as slaves quite well, it's with S7300 and how to best organise my code.
I have used the sample code already written for the Modbus master driver (with a few little tweaks here and there). What i want to now do is set up multiple transmissions to the slave devices. It's now knowing which blocks i can use again, and which ones i have to generate as unique blocks/addresses? I think FB7/FB8 are the actual comms blocks that initiate CP - CPU and vice versa, and DB50/DB70 are the respective assigned instance blocks. What i'm not sure of is the other FB + DB's that are used. There are 4 other DB's used that contain the various parameters for transmission. I need to execute Modbus codes FC01/03/06 on both slave units. I have figured out the principle for this, but not quite how to implement it yet!? (i was just going to increment a register on the 'Done' bit of each successful transmission, and then initiate the next and so on.....)
The samples are written in STL and so it doesn't jump out at me what is probably obvious to experienced S7 users. I can follow what is happening, but not conversant enough to know where i can re-use existing addresses.
I still have two PID loops to set up, and the screens for the MP370 15", but i seem to have got bogged down over this FB/DB stuff.
Any input appreciated.
Hardware comprises;
2 x 315-2DP CPU's (With software redundancy loaded)
2 x IM153-2 Modules
2 x CP341 Modules (One as Modbus Master, One as Slave)
3 x 8AI Cards
1 x 2AO Card
1 x 32DI
1 x 32DO
After wrestling with the redundancy issues, i now have that working fine. The Modbus SLAVE side of things was pretty straight forward, this was connected to a Honeywell DCS system and is communicating fine. The problem i have is with the Modbus MASTER side of things. The problem isn't really with the Modbus - i have it talking nicely to two Atlas Copco compressors acting as slaves quite well, it's with S7300 and how to best organise my code.
I have used the sample code already written for the Modbus master driver (with a few little tweaks here and there). What i want to now do is set up multiple transmissions to the slave devices. It's now knowing which blocks i can use again, and which ones i have to generate as unique blocks/addresses? I think FB7/FB8 are the actual comms blocks that initiate CP - CPU and vice versa, and DB50/DB70 are the respective assigned instance blocks. What i'm not sure of is the other FB + DB's that are used. There are 4 other DB's used that contain the various parameters for transmission. I need to execute Modbus codes FC01/03/06 on both slave units. I have figured out the principle for this, but not quite how to implement it yet!? (i was just going to increment a register on the 'Done' bit of each successful transmission, and then initiate the next and so on.....)
The samples are written in STL and so it doesn't jump out at me what is probably obvious to experienced S7 users. I can follow what is happening, but not conversant enough to know where i can re-use existing addresses.
I still have two PID loops to set up, and the screens for the MP370 15", but i seem to have got bogged down over this FB/DB stuff.
Any input appreciated.