Jump to content

An invitation to suggest ideas for new UDFB's


Eyal Koren

Recommended Posts

On 10/5/2023 at 7:10 AM, David_2019 said:

I suggest adding an in HMI attribute for each Layers Tag: Visibility
This will make it easier to draw different screens by selecting only the "Layer Tag Visibility" parameter.
If the parameter is not entered, Layer is active, and the "Tag Visibility" parameter of each element takes effect - this will maintain compatibility with all previously written applications.

Agreed, I use a screen struct to manually do this.  It would be great if UniLogic auto generated the struct instance for every screen... similar to when you make a new datatable or trend

Link to comment
Share on other sites

  • 3 months later...

It would be great to have a logic function which gives you a number of ones or zeroes in a register or array of bits. It's super useful when you want to check for condition if only one bit is on at a time. Good for checking some input conditions.

For example: 0001011 (0x17) would output 3 (as there are 3 ones). Bit array "0000000000000001000000" would output just 1 because there's just one logical true bit.

Sure, it could be done via software, but a dedicated function for that would be a time saver.

Link to comment
Share on other sites

1 hour ago, kvlada said:

It would be great to have a logic function which gives you a number of ones or zeroes in a register or array of bits. It's super useful when you want to check for condition if only one bit is on at a time. Good for checking some input conditions.

For example: 0001011 (0x17) would output 3 (as there are 3 ones). Bit array "0000000000000001000000" would output just 1 because there's just one logical true bit.

Sure, it could be done via software, but a dedicated function for that would be a time saver.

you could make your own block and then call it whenever you need:
image.png.bd16e6bfc1d180cf4fc7f0a82d9164d6.png

FUN_isArryBit.ulle

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.