mathiasson Posted March 14, 2020 Share Posted March 14, 2020 Hi Vision: I want to make a saw that is supposed to cut steel bars at certain lengths. First both ends are cut so we get even ends. The steel bar is fed into the machine from left to right. There are two laser range finders looking from the right towards the saw blade. When the bar is feed thorugh the machine the laser range finders starts to measure a value. The reason for two range finders is that the steel bar can be bent and to be sure to always see it we need to range finders. When the total length of the bar is measured I want to press a button (total length) and then that value that is shown should be stored in as a constant. When I then reverse the steel bar thorugh the saw I want to calculate how much of bar is on each side of the sawblade and display that. Next time I press the button the process is repeated so that I can cut down the length multiple times. A zero button just resets the whole thing. See example below: Questions: 1. I want to display only the largest value from the two range finders. How do I do that? (I understand how I display both values in separte) 2. Do I need to do scriptining to do this or is it possible by just manipulating screen elements? Quote Link to comment Share on other sites More sharing options...
mathiasson Posted March 14, 2020 Author Share Posted March 14, 2020 Hmm I found the "Reading inputs with the read statement". Then I can activate that when a button is pressed and just compare the two values and then I display the highest value. To know "where" I am I can count the buttonpresses since last reset and then display the value in a box given the counter has the right value. When I press the "reset" button I just reset all boxes. Quote Link to comment Share on other sites More sharing options...
mathiasson Posted March 14, 2020 Author Share Posted March 14, 2020 Just identified how this is done. See attached video. Now its just set variables but the read channel will be used when I get the sensors. 2020-03-14 22-54-31.mkv 200314 - Saw.ctl 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.