10/7/2020 5:20 PM | |
Joined: 1/29/2018 Last visit: 10/12/2022 Posts: 8 Rating: (0) |
@0_Einstein: Thank you so much for reaction. Could you please give me example how to retrieve pointer to bool / word data variable? Or at least function for it. There is no data type for REF_TO Bool. Thats the problem for me.... Thank you. |
Last edited by: Hcode at: 10/07/2020 17:22:25 |
|
10/7/2020 5:35 PM | |
Joined: 7/7/2010 Last visit: 5/3/2024 Posts: 14680 Rating: (2350)
|
Umm, DBname.BoolTagName is a "pointer", since it is the starting location for the data buffer. Since you are using a non-optimized DB, it may require you to use P#DBname.BoolTagName and might even require adding BYTE n where n is number of bytes in the buffer that starts at that tag name.
|
science guy |
|
This contribution was helpful to1 thankful Users |
10/8/2020 7:57 AM | |
Joined: 3/30/2020 Last visit: 5/3/2024 Posts: 4473 Rating: (936) |
Hello. What you are attempting to do does not work in the way that you wish to do it. I am going to detail what Mr. Einstein was thinking of. Note that this will work on the S7-1500 but not work on the S7-1200.
See in-software help on how ANY pointer assignments work. Roughly you specify the first bit and the block size. The assignment might be..
The alternative is to call the communication instruction more than once. You can use the same instance. The trick is to now have the enable activated in the instruction. LAD instructions automatically come with EN and ENO pins. SCL assignment does not have it by default. You need to fill it in manually! instTask({parameters}); ----> instTask(EN := #trigger, {parameters}); The application example about linking a V20 and S7-1200 via Modbus RTU is a good example to work from. (https://support.industry.siemens.com/cs/ww/en/view/63696870) Does this help you? |
Activities of this user is voluntary. There is no obligation or liability placed on this user. Though optional, your 'please' and 'thank you' is highly valued. |
|
This contribution was helpful to1 thankful Users |
Follow us on