2/18/2025 8:53 AM | |
Joined: 11/8/2018 Last visit: 7/4/2025 Posts: 108 Rating:
|
Good Morning, I have a system that was built with logo and a CIM and I wish to upgrade it to S7-1200 the plc configuration address is 40001 and the sensors are a read only unsigned integer. I have seen a lot of programs but when I am trying them no one of them is working. I am programing with Tia Portal V19 Attachmentmobus.zip (213 Downloads) |
Last edited by: MPBusuttil at: 02/18/2025 08:54:02Last edited by: MPBusuttil at: 02/18/2025 14:00:14 |
|
2/18/2025 2:02 PM | |
Joined: 11/8/2018 Last visit: 7/4/2025 Posts: 108 Rating:
|
There are no errors just that no information is seen on the plc |
2/19/2025 7:11 AM | |
Joined: 11/8/2018 Last visit: 7/4/2025 Posts: 108 Rating:
|
Good Morning, I tried it again and the error is 16#818C Regards Mark Paul Busuttil |
2/19/2025 8:34 AM | |
Joined: 11/8/2018 Last visit: 7/4/2025 Posts: 108 Rating:
|
Please find the settings of the sensor
AttachmentPhotos-001 (18).zip (191 Downloads) |
2/19/2025 12:32 PM | |
Joined: 11/8/2018 Last visit: 7/4/2025 Posts: 108 Rating:
|
Error Changed to 16~818B on changed to remove Optimized block access |
2/19/2025 1:27 PM | |
Joined: 11/8/2018 Last visit: 7/4/2025 Posts: 108 Rating:
|
the settings for the other parameters to the block (e.g. MODE, DATA_ADDR) are the attached and there are 3 other similar sensors AttachmentPhotos-001 (18).zip (220 Downloads) |
Last edited by: MPBusuttil at: 02/19/2025 13:28:20 |
|
2/19/2025 4:35 PM | ||||
Joined: 1/17/2007 Last visit: 7/10/2025 Posts: 1561 Rating:
|
There still seems to be something wrong with your DATA_PTR:
This post might help https://support.industry.siemens.com/forum/nl/en/posts/modbus-tcp-error-818b/288740
|
|||
Programming today is the race between software engineers building bigger and better idiot proof programs, and the universe producing bigger and better idiots. |
||||
2/20/2025 8:54 AM | |
Joined: 11/8/2018 Last visit: 7/4/2025 Posts: 108 Rating:
|
DB3 has 4 arrays as per attached the (P#DB3.DBX12.0) was given by the compiler |
2/20/2025 1:45 PM | |
Joined: 1/17/2007 Last visit: 7/10/2025 Posts: 1561 Rating:
|
I think I may have found your problem. According to the help, the data type for the storage area HAS to be a 16-bit type. You have used a USINT which is an 8-bit type. Try making the type a UINT. Data block structures for the DATA_PTR parameter
|
Programming today is the race between software engineers building bigger and better idiot proof programs, and the universe producing bigger and better idiots. |
|
This contribution was helpful to
2 thankful Users |
2/21/2025 9:03 AM | |
Joined: 11/8/2018 Last visit: 7/4/2025 Posts: 108 Rating:
|
Good Morning, Thanks for your reply and blocks looks working but unfortunately i could not see any value on the array am i missing something I am using ladder diagram not STL Regards Mark Paul Busuttil Attachmentno data.zip (132 Downloads) |
2/21/2025 11:00 AM | |
Joined: 1/17/2007 Last visit: 7/10/2025 Posts: 1561 Rating:
|
I'm not sure the blocks are working, as the BUSY output is true and the DONE output is false. When a transaction has completed successfully you should see the BUSY output go false and the DONE output go true. You would have to monitor these online and note the sequence of the BUSY, DONE, ERROR and STATUS outputs in real time. The best way I find to do this is to open the instance data block for the function block and go online with it and use the monitor / modify view. |
Programming today is the race between software engineers building bigger and better idiot proof programs, and the universe producing bigger and better idiots. |
|
2/21/2025 11:21 AM | |
Joined: 11/8/2018 Last visit: 7/4/2025 Posts: 108 Rating:
|
should i include a counter to read from one network after the other? as there are 4 modes trying to read AttachmentWeather Station.zip (126 Downloads) |
Last edited by: MPBusuttil at: 02/21/2025 11:27:55 |
|
2/21/2025 2:42 PM | |
Joined: 1/17/2007 Last visit: 7/10/2025 Posts: 1561 Rating:
|
I am not sure what you are referring to by the word network. Network normally refers to another physical network. However, I suspect that you mean data request when you say network (i.e. data from a different slave device or data of another type or from a different address in the same slave. The correct terminology for these would be telegrams or polls. You will have to schedule each request to each telegram (network). So setup the Modbus request details for first telegram (network), toggle the REQ input high then low. Then wait for the BUSY output to be false and the DONE or ERROR output to be true. If DONE is true and ERROR is false the transaction was successful, so go onto the nest telegram request (network). If ERROR is true and DONE is false, the transaction failed. What you do now is up to you. You can repeat the telegram or maybe take so other action such as skipping it. When you have finished with telegram (network) #1, you would then setup the Modbus request details for nest telegram (network) and repeat. This is what is known as a telegram / poll cycle. It would look something like this: For each telegram (network) (1 to n) |
Programming today is the race between software engineers building bigger and better idiot proof programs, and the universe producing bigger and better idiots. |
|
This contribution was helpful to
1 thankful Users |
2/24/2025 9:40 AM | |
Joined: 4/28/2015 Last visit: 4/19/2025 Posts: 10876 Rating:
|
Hello, if I could say my opinion to this problem, I see in your screenshots the first and important problem: More Master blocks with different instance DBs. eeeeh very sry but your intentions and prj expactations are not clear to me, why you have this idea about more Master blocks. I think that your first and only problem lies here, you do probably some wrong programming steps generally. |
With best regards... |
|
2/24/2025 12:29 PM | |
Joined: 11/8/2018 Last visit: 7/4/2025 Posts: 108 Rating:
|
Thanks for you input but i have tried different type of programming but it seems that is not working. do you have an idea what should be the problem. Thanks AttachmentWeather Station24022025.zip (133 Downloads) |
Last edited by: MPBusuttil at: 02/24/2025 12:32:22 |
|
2/24/2025 12:38 PM | |
Joined: 4/28/2015 Last visit: 4/19/2025 Posts: 10876 Rating:
|
Hello, very sry in this case, also I don't have your TIA version. Again if you want some help from me, pls try better explain what you want to do, maybe we can find some other way but your problem looks to me like this I've described. Simply, I expect one Master block with only one its instance DB, joined to Comm_Load. Then only after collect data from ex. one Slave you stop execution of block and change other parameters you require, then start execution with next Slave in case and again from first after that. Prior change parameters you need stop execution of block with REQ input, hope yo do this. I can imagine more Master blocks but then you can have coordination problem and some collission can occur running 2 Master blocks at one time. try imagine this... |
With best regards... |
|
2/24/2025 1:56 PM | |
Joined: 11/8/2018 Last visit: 7/4/2025 Posts: 108 Rating:
|
Thanks for you reply, I have 3 sensors on a mod-bus and need to read from them regards Mark Paul Busuttil |
Follow us on