10/14/2011 9:45 AM | |
Joined: 3/24/2009 Last visit: 7/9/2024 Posts: 535 Rating:
|
Dear WildChild, which language do you use? The simples way is to use SCL: [code] FUNCTION FC999 VAR_INPUT in1: WORD; in1_bool AT in1: STRUCT x0: BOOL; x1: BOOL; END_STRUCT; END_VAR VAR_OUTPUT out0: BOOL; END_VAR BEGIN out0:=in1_bool.x0; END_FUNCTION [/code] Hope this helps, Best regards, yy1 |
Last edited by: yy1 at: 10/15/2011 9:34 AMChanged FB to FC Last edited by: yy1 at: 10/14/2011 10:10 AM |
|
10/14/2011 9:55 AM | |
Posts: 26 Rating:
|
I use KOP |
10/14/2011 12:45 PM | |
Posts: 26 Rating:
|
Great! Thank you very much!
|
This contribution was helpful to
1 thankful Users |
10/14/2011 1:45 PM | |
Joined: 10/7/2005 Last visit: 8/22/2024 Posts: 3016 Rating:
|
Hello WildChild just a couple of additional pointers from my side: 1.) Make it an FC instead of FB (sing an FB with IDB would be wasteful if you don't need STAT variables) 2.) Feel free to download also a ready made (STL programmed) FC from THIS link. I hope this helps |
Cheers |
|
This contribution was helpful to
1 thankful Users |
Follow us on