kikitron Posted September 27, 2017 Report Share Posted September 27, 2017 Hi, I made simple program to control analog outuput +/- 10V by display. A have two buttons 1 and 2. And if I press button 1 a get analog output +0...10V and if I press button 2 then I get 0 ... -10V (what I set before on display). Now I have problem if i press button I get setted output but when I release it I still have it. Now I need that when I hold the button 1 or 2 I get signal from analog output and when I release it, it has to be 0. I used Store direct function. Is it possble to do that? I dont need linearization for this project. test_analog-out.U90 Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted September 27, 2017 MVP 2023 Report Share Posted September 27, 2017 Yes, all you have to do is insert a net before Net 1 and Store zero into MI 1. test_analog-out_BL.U90 Link to comment Share on other sites More sharing options...
kikitron Posted September 28, 2017 Author Report Share Posted September 28, 2017 @Flex727 thanke you for your answer and solution. Its working now like it should Link to comment Share on other sites More sharing options...
kikitron Posted November 15, 2017 Author Report Share Posted November 15, 2017 Hi to all again. I have one question about ladder program that attached me @Flex727. I have only one button and two end switches. I have on hydraulic cylinder to move down manualy and up automaticaly. When I hold button I need setted output from MI 0 to move cylinder to the end position. And when cylinder activates end switch 1 then I need output from MI 2 to move cylinder automaticaly in zero position. And when he reaches zero position he activates end switch 2 and he stops. Is it possible to do that? I know how to do it with digital outputs Reset and Set, but with analog outputs no Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted November 16, 2017 MVP 2023 Report Share Posted November 16, 2017 I'm not entirely sure what you are trying to do. You say you know how to do it with Reset & Set - go ahead and do that and post it here. I'll take a look and help you with the analog portion. Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted November 16, 2017 MVP 2023 Report Share Posted November 16, 2017 Sounds like you need to program a small sequence, now that you've told us what you're trying to do. Your button becomes a START button, which cycles the cylinder through it's movement. I've attached an example. I edited your I/O to have one button and two switches. You don't have to hold the button while the cylinder is moving. And you can't stop it mid-stroke - I'll leave that as an exercise for you. Joe T. P.S. @Flex727 - You know I love my state machines. test_analog-out_BL_JT.U90 Link to comment Share on other sites More sharing options...
kikitron Posted November 16, 2017 Author Report Share Posted November 16, 2017 Thanke you for the program @Joe Tauser. I Will test the program. I need in one direction to hold the two-hand control button (safety) and when cylinder reaches 1. end switch then cylinder automaticali returns back until he reache 2. end switch and he stops. Link to comment Share on other sites More sharing options...
kikitron Posted November 16, 2017 Author Report Share Posted November 16, 2017 Here is my test program that its not finished yet, because I need to add function that cylinder automaticaly moves back to Home Switch when I release button. In my project I have proportional valve that needs +/-10V to drive it and I have 2 valves that has to work together. 1. When I press and hold Button_1 first it has to activate Valve_1 and after some time (timer T0) it has to activate Valve_2 and proportional valve on speed MI 0. (Cylinder is moveing when proportional valve is acivated). 1.1 This is written in the program in Part 1 and its working. 2. When cylider activates End Switch it has to move back automaticaly until he activates Home Switch: - Button_1 is not pressed - Valve_1 is activated - Delay activated Valve_2 and Proportional valve on speed MI 2 2.1 This I have to add in the program Part 2 :/ test_analog-out_KIki.U90 Link to comment Share on other sites More sharing options...
kikitron Posted November 16, 2017 Author Report Share Posted November 16, 2017 I wrote the program by your help of course and its working Only thing that I need to add extra is that if I let the Button_1, cylinder has to go back in home position automaticaly for safety reason. After that the program should be ok for testing in live. test_analog-out_KIki2.U90 Link to comment Share on other sites More sharing options...
kikitron Posted November 16, 2017 Author Report Share Posted November 16, 2017 And final working program test_analog-out_KIki3.U90 Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted November 16, 2017 MVP 2023 Report Share Posted November 16, 2017 10 hours ago, Joe Tauser said: P.S. @Flex727 - You know I love my state machines. As should everyone! 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