Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

UDINT bits

HVAC and Pumping Forum

Support Forum for HVAC and pumping machines, Modicon M17x and EcoStruxure Machine Expert HVAC software for chillers, AHU, CRAC units for datacenters or process chillers applications - from design, implementation to troubleshooting and more, by Schneider Electric.

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Industrial Automation
  • HVAC and Pumping Forum
  • UDINT bits
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
FedericoM
Commander FedericoM Commander
66
Bastian_Schmitz
Admiral Bastian_Schmitz Admiral
47
LeTomas
Lt. Commander LeTomas Lt. Commander
14
View All

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Solved Go to Solution
Back to HVAC and Pumping Forum
Solved
otrotabi
Lt. Commander otrotabi
Lt. Commander

Posted: ‎2022-06-14 11:51 AM

0 Likes
10
3030
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-06-14 11:51 AM

UDINT bits

I need to access the bits of a Udint variable. Particularly I need to know when a compressor is working during it´s minimum on time delay. This is signaled by bit 28 of the CompCntrl_OnOff FB.

 

status.png

 

So, how can I access that ? I know how to use WordtoBit funcion block, but there does not seem to be a similar one for UDINT format.

 

Is there an easy way for this ?

 

 

Labels
  • Labels:
  • HVAC
  • Tags:
  • ecostruxure
  • english
  • hmi
  • hvac
  • TM172
Reply

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic

Accepted Solutions
Bastian_Schmitz
Admiral Bastian_Schmitz Admiral
Admiral

Posted: ‎2022-06-14 10:48 PM

0 Likes
8
3011
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-06-14 10:48 PM

Hi,

The possible solution depends on the used target.

IF you use TM172 you can read out a single bit via the syntax var.numberofbit.

In your case var.28.

This solution is not supported of the firmware of TM171O or TM171P.

 

You could also use  AND with the word with the constant 2#10000000000000000000000000000 or 536870912 or 16#2000000.

That is more or less the say way how the wordtobit function work.

 

You can find these as example here

 

And at least there is also an additional library for your purpose. You can find these here

In the Basic addon library is a function to convert a dword to bit. 

Between dword and udint is not a real difference. 

BYTE,WORD,DWORD will be shown as hexadecimal value USINT,UINT,UDINT as decimal value.

 

best regards

 

See Answer In Context

  • Tags:
  • english
  • ESME HVAC
  • TM172
Reply

Link copied. Please paste this link to share this article on your social media post.

Replies 10
Bastian_Schmitz
Admiral Bastian_Schmitz Admiral
Admiral

Posted: ‎2022-06-14 10:48 PM

0 Likes
8
3012
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-06-14 10:48 PM

Hi,

The possible solution depends on the used target.

IF you use TM172 you can read out a single bit via the syntax var.numberofbit.

In your case var.28.

This solution is not supported of the firmware of TM171O or TM171P.

 

You could also use  AND with the word with the constant 2#10000000000000000000000000000 or 536870912 or 16#2000000.

That is more or less the say way how the wordtobit function work.

 

You can find these as example here

 

And at least there is also an additional library for your purpose. You can find these here

In the Basic addon library is a function to convert a dword to bit. 

Between dword and udint is not a real difference. 

BYTE,WORD,DWORD will be shown as hexadecimal value USINT,UINT,UDINT as decimal value.

 

best regards

 

  • Tags:
  • english
  • ESME HVAC
  • TM172
Reply

Link copied. Please paste this link to share this article on your social media post.

otrotabi
Lt. Commander otrotabi
Lt. Commander

Posted: ‎2022-06-15 07:34 AM

In response to Bastian_Schmitz
0 Likes
6
2994
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-06-15 07:34 AM

Thanks for the very detailed answer. I gather that if I want to share the same code for TM172 and TM171 it is better to use a function rather than use the bit access like in "Var.bit" format.

 

I had tried this before but I do not remember whether the development platform was a TM171 or I was expecting the IDE to show me the bits like it does when you write "." in a function ... 

 

One further question, although I think I know the answer: having a library available to the project´s library tree does not impose any further PLC memory overhead, right ? I mean, you only include and use those functions or FB that are used within a project´s program actually included in a task list, right ?

 

libraries.png

 

 

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

Bastian_Schmitz
Admiral Bastian_Schmitz Admiral
Admiral

Posted: ‎2022-06-15 07:46 AM

In response to otrotabi
0 Likes
5
2990
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-06-15 07:46 AM

Only in the Project used FBs FCs use space. You can add so many Libararys you want. But if I can give you a tip please remove the Pumping library. These is in 99% not used and need 2MB in the project file. The last 10 versions of the project are saved in the project folder. If you remove the pumping library you can save a lot of space. That could be usefull if you want send the project per E-Mail.

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

otrotabi
Lt. Commander otrotabi
Lt. Commander

Posted: ‎2022-06-15 08:49 AM

In response to Bastian_Schmitz
0 Likes
4
2982
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-06-15 08:49 AM

Ok. Thanks for the tip.

 

So, If I add a library, the library is stored in the project (it is not a link to where the library manager points to) and this is how it can warn you about the library being updated on the library location, when you first open the project.

 

I agree, I did check the pumping library and seems to be quite sofisticaded for a standard project. I had to develop my own function block for the pump, including a flow sensor input which we always use in our chillers. 

 

As a side note (if you want to dig into it), the .plcprj  shrinked by about 500 kbytes after removing this library and though not present in the library manager, it is still present in the HMIRemote folder.

 

One last question: I think of FB as "classes" but the inheritance concept seems to be missing. So you need to be very carefull about how you define inputs and outputs, right ? If you want to modify a previously defined function included on a library by adding more inputs or outputs, what is your strategy ? Name it differently ?

 

 

 

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

FedericoM
Commander FedericoM Commander
Commander

Posted: ‎2022-06-17 09:07 AM

In response to otrotabi
0 Likes
3
2948
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-06-17 09:07 AM

Hi,

 

if you add input/output to a FB and you want to maintain back compability with previous versions, you have to add them in the last position (in FBD language it will appear on the bottom).

Moreover, your updated FB with an additional input should work like the previous one when the new input is disconnected, i.e. the default value of the new input has to be selected in order to obtain this behavior.

If you do this, you can update your project with the new library containing this FB and you don't have to update the programs using it, unless you want to really set the additional input.

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

otrotabi
Lt. Commander otrotabi
Lt. Commander

Posted: ‎2022-06-17 02:24 PM

In response to FedericoM
0 Likes
2
2940
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-06-17 02:24 PM

I see.  Great tip.

 

Thanks

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

Bastian_Schmitz
Admiral Bastian_Schmitz Admiral
Admiral

Posted: ‎2022-06-19 10:49 PM

In response to otrotabi
0 Likes
1
2889
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-06-19 10:49 PM

As example you can look on the press2temp FB. These get additional inputs in the past. If you use them in an older project you will have only the inputs which are still shown in the online help. If you renew the block with the exisiting instance you will see the additional inputs. But it will work proper in both cases.

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

otrotabi
Lt. Commander otrotabi
Lt. Commander

Posted: ‎2022-06-20 12:35 PM

In response to Bastian_Schmitz
0 Likes
0
2868
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-06-20 12:35 PM

Thanks Bastian for your comments.

 

One further thing about libraries. According to  2014 Programming guide:

 

3.8.2.1 UNDOING EXPORT TO A LIBRARY
So far, it is not possible to undo export to a library. The only possibility to remove an ob-
ject is to create another library containing all the objects of the current one, except the
one you wish to delete.

 

And this is the what happens if you right click on a function block and Export to Library:

 

library management.jpg

 

So, is there anything new about library housekeeping ? Is it possible to update a function block (I mean, replace it with a newer version withouth changing the rest of the FBs). Moreover, how does library directory structure work, is it possible with tools available to non-Schneider people ? 

 

library structure.jpg

 

 

  • Tags:
  • english
Reply

Link copied. Please paste this link to share this article on your social media post.

Josh4
Josh4
Cadet

Posted: ‎2024-02-28 04:52 AM

In response to Bastian_Schmitz
0 Likes
0
1581
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2024-02-28 04:52 AM


@Bastian_Schmitz wrote:

Hi,

The possible solution depends on the used target.

IF you use TM172 you can read out a single bit via the syntax var.numberofbit.

In your case var.28.

This solution is not supported of the firmware of TM171O or TM171P.

 

You could also use  AND with the word with the constant 2#10000000000000000000000000000 or 536870912 or 16#2000000.

That is more or less the say way how the wordtobit function work.

 

You can find these as example here

 

And at least there is also an additional library for your purpose. You can find these here

In the Basic addon library is a function to convert a dword to bit. 

Between dword and udint is not a real difference. 

BYTE,WORD,DWORD will be shown as hexadecimal value USINT,UINT,UDINT as decimal value.

 

best regards

 


Can you update the link for the additional libraries, I'm not sure where to find them.  Current link is broken.

Thanks,

Josh

Reply

Link copied. Please paste this link to share this article on your social media post.

otrotabi
Lt. Commander otrotabi
Lt. Commander

Posted: ‎2024-03-03 04:00 AM

0 Likes
0
1569
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2024-03-03 04:00 AM

Hello Josh,

 

It´s been a while, so I am not sure.  But I think this one is the file Bastian shared.

 

Basic addons Library 

 

Regards

Reply

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of