10/14/2011 9:45 AM | |
Joined: 3/24/2009 Last visit: 7/9/2024 Posts: 535 Rating: (112) |
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: (0) |
I use KOP |
10/14/2011 12:45 PM | |
Posts: 26 Rating: (0) |
Great! Thank you very much!
|
This contribution was helpful to1 thankful Users |
10/14/2011 1:45 PM | |
Joined: 10/7/2005 Last visit: 11/11/2024 Posts: 3026 Rating: (1057)
|
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 to1 thankful Users |
Follow us on