Jump to content

VisiLogic: displaying different MF's inside of one numeric field on HMI


Recommended Posts

Hello,

I am new to this forum. I am making a project where I am measuring pressure values inside 10 water tanks. So I am measuring 10 MF vaules. On the screen I can select a water tank, which pressure I want to view.  After the selection, that takes me to next HMI screen (I would like to keep  only one Display/screen on HMI) where I will view pressure in this tank. I would like it to show me only the pressure in that specific tank that I have selected previously. So on my HMI I would like to insert only one 'Numeric' ''box'' (where I can view MI or MF,...), but only the MF or MI of that tank I have selected. 

So it would be similar to 'List of texts: by pointer', but with numeric values.

Is there an answer in vectors maby, or any other way? I would be very happy for an answer.

Thank you, Jan

Link to comment
Share on other sites

  • MVP 2023

Don't use floats unless you really, really need them.  They don't lend themselves well to use in ladder logic or on the display.  Depending on your range and precision required, use an MI or an ML with a virtual decimal place.

If you keep the data in MIs you can easily implement the data selection logic you describe above.

If you attach your program we can see what you're doing and be more helpful.

Joe T.

Link to comment
Share on other sites

  • MVP 2023
13 minutes ago, Joe Tauser said:

Don't use floats unless you really, really need them.

This cannot be emphasized strongly enough. And when do you need them? Never. Okay, it's not never, but it might as well be. If a sensor or other device will only output a float (stupidly, in my opinion), or if there was some unique situation where you cannot know in advance the precision of a number being worked with (can't imagine how, but if so it would require a float). Any other reason? I can't think of any.

13 minutes ago, Joe Tauser said:

use an MI or an ML with a virtual decimal place.

I find that far too many programmers fail to understand what this is or how to do it. Is it a failure of mathematics education, or something else?

Link to comment
Share on other sites

Thank you for reply. Well I am using Pressure transmitters 4-20mA on 10-bit (Analog inputs).  First I linearize them (X and Y). My sensor can read from 0-2,5 [bar]. I can't write constant 2,5 in Y2. So that is why i wrote 25 and then I use math function DIV (calculates MI2/10[constant]) and i get for example 2,5 or any other value.

Or can I display for example 25 as 2,5 in my 'numeric box' on HMI? Never tried that.

Jan

Slika.PNG

Link to comment
Share on other sites

  • MVP 2023
1 hour ago, Flex727 said:

I find that far too many programmers fail to understand what this is or how to do it. Is it a failure of mathematics education, or something else?

Anyone who has ever used a slide rule understands all of this intuitively, but I don't think anyone younger than 50 (60?) ever has. With a slide rule, you do all computations without regard to decimal location and just keep track of it mentally. At the end you add up the decimal places in your head and write it down accordingly. That said, I certainly wouldn't trade my calculator for a slide rule today. :)

  • Like 1
Link to comment
Share on other sites

Okey thank you I will try that I need 1 decimal place but it is good to know.

One more question on this topic. 

Lets say I want my machine to hold 2,5 bar in sistem. I will need to store that number in my MI. I would like the user to write value - 2,5 (like in real life) with keyboard, and not 25. Are parameters in my 'numeric box' correct?

Slika2.PNG

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...