Mick Posted June 21, 2017 Report Share Posted June 21, 2017 Hello! I make a program for a battery charger. For charge the battery i need two voltage level (Floating at 270V and Boost at 276V) : The piece of programm is in the attached file. I use two set point ( I can increment or decrement the two set point on the screen) : - MI20 : Floating voltage set point - MI22 : Boost voltage set point Then, i use a SUB function to obtain MI4 : the difference between MI22 and MI20 Next , i use a ADD function to obtain MI23 : The sum of MI20 and MI4 The MI23 is linearized and send to the analog output MI21 This doesnt work because the out of the math function not include the state of the bit MB 31 at the input. In fact, i would send 270V (MI22) to the analog output when the MB31 is off, and send 276V (MI20) to the analog output when the MB31 is ON. Would anyone have a solution? And sorry for my english! Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted June 21, 2017 MVP 2022 Report Share Posted June 21, 2017 Perhaps I don't understand what you're doing because it seems simple and obvious what to do. Use a buffer MI to store the value you want to go to the analog output. Use two rungs, one with a direct contact of MB 31 to store MI 20 to your buffer MI and a second rung with an inverted contact of MB 31 to store MI 22 to the buffer MI. Use the buffer MI in the Linearization function block. Quote Link to comment Share on other sites More sharing options...
Mick Posted June 22, 2017 Author Report Share Posted June 22, 2017 Ok, i undersatand , but don't find a buffer MI. Could you tell me what is a buffer MI? Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted June 22, 2017 MVP 2022 Report Share Posted June 22, 2017 Just use any unused MI to hold the value that will change depending on the state of MB 31. 1 Quote Link to comment Share on other sites More sharing options...
Mick Posted June 23, 2017 Author Report Share Posted June 23, 2017 Ok, I did not understand what the store function was used for. Thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.