3/7/2025 8:08 AM | |
Joined: 8/22/2024 Last visit: 3/14/2025 Posts: 6 Rating:
|
Hi everyone I need to implement I/O field through many tags of I/O. I tried to write VBscript - but i'm not a quite good with this. So... next code can only READ or WRITE. ///----------------------------------------------------------- Finction OutputValue_Trigger (Byval Item) Dim N_Tag Set N_Tag = HMIRuntime.Tags(*MayTag*) 'Just Read from tag OutputValue_Trigger = N_Tag.Read ' Just Write to tag OutputValue_Trigger = item.InputValue N_Tag.Write(OutputValue_Trigger) End Function ///------------------------------------------------------------ I can not use both ways ... (Read and Write) only Read or Write. But i need read and write. Somebody help me please... Thanks. |
3/7/2025 12:50 PM | |
Joined: 8/3/2009 Last visit: 3/14/2025 Posts: 14990 Rating:
|
Hello Papiksub If you do not want to dynamize the tag directly to the output value property of the IO Field, then you can use a Script with tag trigger at the: and for Writing into the Tag you can use a Script at: If you need basic help for reading or Writing Tags in scripts then have a look at this: https://support.industry.siemens.com/cs/ww/en/view/109976624/118089674379 https://support.industry.siemens.com/cs/ww/en/view/109976624/45951188235 Bye Murof |
Last edited by: Murof at: 03/07/2025 12:52:56If this Information really helps, you could use the Rate function |
|
3/14/2025 5:56 AM | |
Joined: 8/22/2024 Last visit: 3/14/2025 Posts: 6 Rating:
|
I did this a long time ago. Just forgot about this post. The code below - maybe will help for somebody. This csript must be insert in < Output Value >. Regards.......
|
Follow us on