WKTilton Posted April 10 Report Posted April 10 I have a STATUS WORD coming from a Festo FB in my Sysmac Studio program and I need to get down to the BOOL level of that UINT as the have specific designations I want to use in my program. I am not very well versed in Sysmac Studio, how can I do that? Thanks,
chelton Posted April 10 Report Posted April 10 A couple of ways. Look at "Union" data types. Alternatively the "testabit" instruction.
SSK Posted April 11 Report Posted April 11 Check below example whether helpful, Convert by using Ary byte commands. Can split into each byte into 8 bit
WKTilton Posted April 11 Author Report Posted April 11 I just remembered this morning that I have done this in the past...been a while... I did use a UNION Data Type 🙂 Then I was able to use "Bits" to view and utilize in the rest of my program. Thanks for the response anyway 🙂
BE Posted April 14 Report Posted April 14 +1 to the TestABit option. I find it better if I am creating functions or function blocks, as they can easily be copied between programs without having to remember to copy over the union also. And the SetABit and ResetABit functions work perfectly too if you are going the other way (ie. a control word).
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now