4/29/2009 8:33 AM | |||
Joined: 9/27/2007 Last visit: 12/18/2020 Posts: 993 Rating: (102)
|
hi you can do this with a c-skript in the best way. Use "SetTagMultiWait" or "SetTagMultiStateWait" Example (from WinCC Information System) "SetTagMultiWait" BOOL ok; ok=SetTagMultiWait("%d%s%f", "Ernie_word", 16, "Ernie_char", "Hallo Welt", "Ernie_double", 55.4711); #define DATA_SIZE 5 DWORD dwData[DATA_SIZE]; SetTagMultiStateWait(dwData,"%d%d%s%f%d","gs_tag_bit",lValue1, "gs_tag_SByte",lValue2, "gs_tag_char",szValue3, "gs_tag_float",lValue4, "gs_tag_word",lValue5);
|
||
Learn more about visualization - visit the HMI courses of Siemens AG! |
|||
4/29/2009 7:40 PM | |
Posts: 3 Rating: (0) |
I'm trying this, but I don't know C at all. Not sure if I am just not changing the right things... Basically what I have is a picture that writes a 1 to a data block to activate a FC. The problem is that the bit stays true and since there are 5 different bits to choose from, I need a way to write a 0 to each one of them at once, allowing me to pick the next bit that will be activated. I am attaching a copy of the code, along with the errors. Any help will certainly be appreciated. Scott AttachmentButton code.zip (59 Downloads) |
4/30/2009 9:22 AM | |
Joined: 4/5/2006 Last visit: 12/4/2024 Posts: 917 Rating: (63) |
Hi saresin, I inserted attached function in Button events, and it' works. Regards AttachmentButton code.zip (78 Downloads) |
Follow us on