2/8/2020 7:38 PM | |
Joined: 3/27/2017 Last visit: 3/19/2024 Posts: 54 Rating: (0) |
|
2/8/2020 7:38 PM | |
Joined: 3/27/2017 Last visit: 3/19/2024 Posts: 54 Rating: (0) |
|
2/9/2020 6:10 PM | |
Joined: 3/16/2015 Last visit: 10/10/2021 Posts: 1250 Rating: (173) |
OK so here's what I understand ( really guessing): You have an s7-1500 with ET200SP and TM Count 1x24 and have it configured as a technology object. And DQ0 is connected to a drive/motor. How DQ0 behaves depends on a few settings; some can be modified in user program and some can not and can only be set in Hardware configuration. For example, and that's how I used it, you can have DQ0 remain turned on after it is set (After set command from CPU until comparison value) and then it turns off when the counter reaches the comparison value you configured. To make those configurations you need to click on the configuration icon in the HSC instructions and go to Behavior of DQ0. You can also get to configuration from the project tree under technology objects. To put your mind at ease just put a test tag in the Hardware Interrupt to make sure that the interrupt is being triggered at the comparison value. These modules are quite complex in my view and you will need to do quite a bit of reading of the module manual and this manual. There are a couple of examples out there to also look at. . |
2/10/2020 8:36 PM | |
Joined: 3/16/2015 Last visit: 10/10/2021 Posts: 1250 Rating: (173) |
Have a look at this example. It is version and needs to be upgraded first to TIASP13-SP1/ or SP2 so that it can be opened in later versions. I converted it to TIA13SP2 and attached it. (Siemens was great to respond and upgraded the project to TIA 14 and 15) There are two projects; look in the FIll _bottle project and you will see how they addressed the HSC technology object directly by it's database.
You can do the same to address your counter; that's one way of doing it. To see the HSC database go to the project tree?Technology object and right click on the HSC>then from the context menu select Open DB editor In the code you will see how the new count value was reset to zero. In your case you will use this code in a start OB and set the value to the one save in the retentive tag. The file is too big to attach so I uploaded to mega where you can download it and hopefully the moderator will upload it too. I also contact Siemens to add an upgraded version as I find this example very helpful. |
Last edited by: Jen_Moderator at: 02/11/2020 09:26:35Optimized link. Last edited by: Kal.A at: 02/12/2020 17:16:51 |
|
2/12/2020 5:21 PM | |
Joined: 3/27/2017 Last visit: 3/19/2024 Posts: 54 Rating: (0) |
Thank you Mr. Kal.A , I will try. |
3/7/2020 7:45 AM | |
Joined: 3/27/2017 Last visit: 3/19/2024 Posts: 54 Rating: (0) |
THANK YOU MR. Kal.A , NOW IT'S OK THANKS BROTHER, YOU TEACH ME. |
This contribution was helpful to2 thankful Users |