Pedro Borges Posted April 12, 2022 Report Share Posted April 12, 2022 Hi, I want to change the conversion from 1 impulse per 1 cubic meter to one impulse per 100 liters would appreciate help. Link to comment Share on other sites More sharing options...
MVP 2023 kratmel Posted April 13, 2022 MVP 2023 Report Share Posted April 13, 2022 1 cubic meter = 1000 liters Then you must devide result by 10. Or if you only use this DW10 for HMI - shift decimal point position from 000000000m3 to 00000000.0m3 Link to comment Share on other sites More sharing options...
Pedro Borges Posted April 13, 2022 Author Report Share Posted April 13, 2022 thanks , but how do I do that in terms of code? is that the value of DW10Q1TOTAL is what is being passed to the hmi for the totalizer variable in m3 I don't have to use the add function to be able to do the conversion? Link to comment Share on other sites More sharing options...
Pedro Borges Posted April 13, 2022 Author Report Share Posted April 13, 2022 but I want values in the totalizer in m3. I have to convert the 100 liters to m3 ? 1 impulse = 100 liters Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted April 13, 2022 MVP 2023 Report Share Posted April 13, 2022 I have to say that we're not understanding what you're confused about. Kratmel explained it well. If you only need to display the value on the HMI screen, then you don't need any additional math - just display with 1 decimal place. If you need m3 for other purposes within your program, then divide by 10. Link to comment Share on other sites More sharing options...
Pedro Borges Posted April 13, 2022 Author Report Share Posted April 13, 2022 despite being 1 impulse = 100 liters. I want with totalizer values in m3 Link to comment Share on other sites More sharing options...
Pedro Borges Posted April 13, 2022 Author Report Share Posted April 13, 2022 output of one impulse per 100 liters (instead of the current 1 impulse per 1 m3). Link to comment Share on other sites More sharing options...
Pedro Borges Posted April 13, 2022 Author Report Share Posted April 13, 2022 I use DW10 to receive the impulses and to show the value on the HMI Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted April 13, 2022 MVP 2023 Report Share Posted April 13, 2022 4 hours ago, Pedro Borges said: but how do I do that in terms of code? Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted April 13, 2022 MVP 2023 Report Share Posted April 13, 2022 This all comes down to how many impulses does your encoder send for 1000l. From what you are saying, my understanding of all of this is that at present you get ONE impulse for ONE cubic metre. If that is the case, you have no way of deriving 100 litres accurately. You need a different encoding device with smaller resolution. If your flow rate is fairly constant you could do a guess by doing maths on time elapsed between each 1000l pulse, displaying the result on screen, and then modifying the result on each new pulse, but the result won't be a perfect match to what's actually happening. It would be theoretical. cheers, Aus Link to comment Share on other sites More sharing options...
Pedro Borges Posted April 13, 2022 Author Report Share Posted April 13, 2022 thanks, one impulse per cubic meter was what it was before. now it is 1 impulse per 100 liters converting later to m3 for the totalizer. In the variable DW10Q1TOTAL the value that i will have to incremente is 1 in 1 or is it 100 in 100 ? Link to comment Share on other sites More sharing options...
Pedro Borges Posted April 14, 2022 Author Report Share Posted April 14, 2022 but conversion terms 1 impulse = 100 liters is equal to 1 impulse = 0.1 m3 Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted April 14, 2022 MVP 2023 Report Share Posted April 14, 2022 Pedro, what is 10 X 0.1? That's right. 1. So I'm leaving this as something to wrap your brain around. 👨🏫 If you are now getting 10 times the impulses for the amount that needed 1 impulse before, what do you need to do? Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted April 14, 2022 MVP 2023 Report Share Posted April 14, 2022 I'm at a loss. Maybe it's just the language barrier, but your posts make it look like you're having difficulty with grade school math. There are probably better resources for that than this forum. Perhaps you're having trouble understanding how to deal with decimals when you have integer operands? If so, typically you use the number as though it didn't have a decimal and just account for it at the end, keeping track of where it should be through subsequent operations. For displaying on the HMI screen, nothing needs to be done as the HMI variable has the ability to display the decimal for you. Link to comment Share on other sites More sharing options...
Pedro Borges Posted April 14, 2022 Author Report Share Posted April 14, 2022 Thanks, I was trying to do like this. but I can't put the value 0.1 in the DUnS# variable I want it to increment the totalizer from 0.1 to 0.1 which is 1 impulse Link to comment Share on other sites More sharing options...
Fernando Castro Posted April 14, 2022 Report Share Posted April 14, 2022 1 hour ago, Pedro Borges said: Thanks, I was trying to do like this. but I can't put the value 0.1 in the DUnS# variable I want it to increment the totalizer from 0.1 to 0.1 which is 1 impulse thats because you can no use floating values unless you are using float type registers and float math funcions. However, as mentioned before you may not need to use floats, places just work with integers and select the decimal position on the HMI for the visualization. Use integers so DW10 will be using 1 increments, then you select display DW10 with the decimal point on the first digit so DW stores 1 but displays .1, if it stores 10 it will be displayed 1.0 if it stores 100 it will be displaying 10.0 and so on. As you should know computers doesn't like small numbers it is easy for them to just to use integers and shift the decimal point. But if you really need to work with small numbers there is the floating type Link to comment Share on other sites More sharing options...
Pedro Borges Posted April 14, 2022 Author Report Share Posted April 14, 2022 Thank you, how did you get to that part in the visiologic program ? Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted April 14, 2022 MVP 2023 Report Share Posted April 14, 2022 Pedro, if you need to learn something new on a PLC, before you try to write your own program you experiment with the unit and programming features to get a full understanding of how the new concepts you want to use work. Once you've gained that understanding and knowledge, assembling your program is fairly easy. Your questions are frustrating/puzzling for our volunteer forum members because they show that you have not done the above steps. You are asking the forum for very basic knowledge that is easily learnt from the Help files and examples. Your question "how did you get to that part in the visiologic program?" is such a thing, because how to display numbers on the screen is one of the first things you should learn. I also suggest that you open Visilogic and browse through all the various menus and icons, and if you find something you want to use but don't understand, it will be referenced in Help. This will give you a much better background of how to use everything. Link to comment Share on other sites More sharing options...
Pedro Borges Posted April 15, 2022 Author Report Share Posted April 15, 2022 Thanks, I've been looking for this dw menu in the visiologic program and I haven't found it Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted April 15, 2022 MVP 2023 Report Share Posted April 15, 2022 That is a feature that allows you to create an operand description for multiple consecutive operands. Be sure you have unused operands within the range you are creating, then enter the number of consecutive operands you are creating and press OK. You can also number them consecutively by clicking the Insert Number button. This can be found in the Help file under Operand Descriptions. I strongly recommend watching some of the Unitronics YouTube videos for basic learning of VisiLogic, reviewing the Help file, and reviewing the example projects that came with your VisiLogic installation. Link to comment Share on other sites More sharing options...
Pedro Borges Posted April 15, 2022 Author Report Share Posted April 15, 2022 Thanks, I don't have to use real variables ? or use MF Variables to have the 0.1 ? Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted April 15, 2022 MVP 2023 Report Share Posted April 15, 2022 If you put a "Numeric/Number" into the HMI screen, the "dw menu" you can't find will open. This is why I say you have not done basics. It would appear that you haven't ever put a numeric onto the HMI, which is a fundamental reason to be using a PLC with an inbuilt HMI. The feature you DID find is not necessary for what you want to do. The insertion of a number onto the screen lets you adjust the decimal point location of that number, amongst many other things you can do to it. Link to comment Share on other sites More sharing options...
Pedro Borges Posted April 16, 2022 Author Report Share Posted April 16, 2022 thanks, but this variable also goes to the Scada Link to comment Share on other sites More sharing options...
Pedro Borges Posted April 16, 2022 Author Report Share Posted April 16, 2022 Just put the value one in the field that I made the blue rectangle in the image and 0.1 appears when it receives 1 impulse ? Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted April 16, 2022 MVP 2023 Report Share Posted April 16, 2022 1 hour ago, Pedro Borges said: Just put the value one in the field that I made the blue rectangle in the image and 0.1 appears when it receives 1 impulse ? Yes. 1 hour ago, Pedro Borges said: thanks, but this variable also goes to the Scada The SCADA should also have the ability to either divide by 10 or otherwise convert to 1 decimal place. Link to comment Share on other sites More sharing options...
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