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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...