3/12/2018 10:21 AM | |
Joined: 6/5/2014 Last visit: 4/25/2021 Posts: 109 Rating: (1) |
Dear all, Any update? Best Regards, |
3/12/2018 2:44 PM | |
Joined: 11/5/2012 Last visit: 4/2/2024 Posts: 487 Rating: (63) |
Hello Mahmoud.Hazem, you can use an script you accomplish what you need. Take a look at this link to see how to dynamize an object, and instead of using the properties height and width, you can use Top, which should be the Y coordinates of your graphic object, then evaluate your bits, something like this: Dim graphic Dim bool1, bool2, bool3, bool4, bool5, bool6, bool7, bool8 bool1 = SmartTags("bool1tag") bool2 = SmartTags("bool2tag") '... and so on Set graphic = HmiRuntime.Screens("ScreenNumber").ScreenItems("graphicidentifier") If bool1 Then graphic.Top = 50 ElseIf bool2 Then graphic.Top = 100 ElseIf bool3 Then graphic.Top =150 ' and so on Else graphic.Top =500 End If If your 8 bits are part of the same byte, you could use a case statement and evaluate a number. Doing this you will be able to let your application manipulate the position of your graphic object depending of variables values. I hope this information helps you. Regards. |
Last edited by: Jen_Moderator at: 3/12/2018 3:46:56 PMOptimized link. |
|
This contribution was helpful to1 thankful Users |
3/13/2018 3:25 PM | |
Joined: 11/5/2012 Last visit: 4/2/2024 Posts: 487 Rating: (63) |
Hello Mahmoud. What the acquisition mode of your tag? If its on "Cyclic on use" or "Cyclic on demand", can you try to change it to "Cyclic continuous" please? Regards. To move in X axis you use .Left property Edit: Hello, i just made a simple project to modify both properties, left and top. reading a PLC tag with Cyclic on use acquisition mode and its working alright. Attachmenttesthmi.zip (111 Downloads) |
Last edited by: Rescobedo at: 3/13/2018 3:37:08 PMLeft property Last edited by: Rescobedo at: 3/13/2018 4:13:29 PMattachment |
|
This contribution was helpful to1 thankful Users |
3/13/2018 4:14 PM | |
Joined: 11/5/2012 Last visit: 4/2/2024 Posts: 487 Rating: (63) |
plc attachment. I tested it using PLCsim NOTE: is just a small project for scipt call tests, and properties tests. Attachmenttestplc.zip (97 Downloads) |
Last edited by: Rescobedo at: 3/13/2018 4:15:17 PM |
|
This contribution was helpful to1 thankful Users |
4/6/2018 5:12 AM | |
Joined: 6/5/2014 Last visit: 4/25/2021 Posts: 109 Rating: (1) |
Dear Rescobedo, I use this script on one object and it works well bur when I use it on another object with different misc on the same time it doesn't work, so do you have any thoughts about the reason behind this ? Best Regards, |
4/6/2018 6:08 AM | |
Joined: 9/21/2012 Last visit: 4/25/2024 Posts: 3923 Rating: (444) |
If i remember correctly, only one script can be running at a time. |
This contribution was helpful to1 thankful Users |
Follow us on