Saw with length measurement - How to implement?


Recommended Posts

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?

 

userinterface.png

Link to comment
Share on other sites

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.

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.