News:

  • May 01, 2026, 10:49:30 PM

Login with username, password and session length

Author Topic: help on brx plc  (Read 18112 times)

maciek

  • Sr. Member
  • ****
  • Posts: 95
help on brx plc
« on: April 05, 2017, 10:23:29 PM »
kind of a noob trying to read the value of  D10 but i want to read the value of it at a specific time and save that value but when the value of d10 changes at some other time it changes my value that i tried saving

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: help on brx plc
« Reply #1 on: April 06, 2017, 05:17:52 AM »
If you could post a screenshot of what you have tried, then we can try to help you get it figured out.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

maciek

  • Sr. Member
  • ****
  • Posts: 95
Re: help on brx plc
« Reply #2 on: April 06, 2017, 06:20:27 PM »
i am using axpostrap to control  motion move using d2 as position value than i do math expression d2 -d2 to go back to original position which zeros out the c more numeric entry and if i want to go to the same position number of times i have to reenter it every time

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: help on brx plc
« Reply #3 on: April 11, 2017, 10:28:46 AM »
i am using axpostrap to control  motion move using d2 as position value than i do math expression d2 -d2 to go back to original position which zeros out the c more numeric entry and if i want to go to the same position number of times i have to reenter it every time

What triggers your motion?  It is possible you want to set D2 as the desire position, and say, D3 as the Position in the AXPOSTRAP instruction. Then, on your trigger, it writes D2 into the target position. Maybe something like this:



Also: why not just use an absolute position? The position you're at is "0", and move to your target, and when it is complete, home again?

maciek

  • Sr. Member
  • ****
  • Posts: 95
Re: help on brx plc
« Reply #4 on: April 14, 2017, 02:14:45 PM »
that looks good but what if i want to go to multiple different positions before i go back to zero and all with one push button
any ideas on that
i tried stage but that does not seem all that good

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: help on brx plc
« Reply #5 on: April 16, 2017, 08:29:11 AM »
that looks good but what if i want to go to multiple different positions before i go back to zero and all with one push button
any ideas on that
i tried stage but that does not seem all that good

Are these set positions? As in, they'll always be the same set of numbers? Like go to 4000, 5000, 6000, and then return to zero? Or will it be operator entered numbers that are always different?

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: help on brx plc
« Reply #6 on: April 16, 2017, 05:21:00 PM »
I've attached a basic program. It takes a few inputs. R0-R9 would be the number of inches you wanted to move (this is an Absolute position. I set this up for an 18 TPI screw with a stepper at 5000 PPR). It will figure out how many moves you have, and then execute the moves with a 1.5s pause between the moves. After it completes the last move, it will return to the home position. You'll have to tweak this for your specific application. I imagined a screen with 10 numeric entries and a button to enter those values on your HMI. When you change them, you hit the enter or LOAD VALUES button (whatever you want to call it but it's C7 in this program) and that will zero all the previous values.

Inside the AXPOSTRAP function, there is a multimove option. When the function goes and stays active, you make it move to the position by toggling a set bit. It's C3 in this program. Once it goes active, you can change the target position, and once it reaches it's target, you toggle it again to make the next move. That's what this program does. It uses a timer to wait 1.5s after the axis reaches position, and then toggles the multimove bit.

The only issue I can see is if you want to move to 0 or "home" as one of your moves. Since it uses math to count your moves, it will cross up the position values.
EDIT: I made a second version of this program that will always run 10 programmed moves. If you just set the moves you don't want to make to 0, it will just pause for 1.5s and then move to the next move. This program will allow for moving back to home position as one of your moves.

Here is the moves I had this make:

https://youtu.be/QaboM0avClY


« Last Edit: April 16, 2017, 05:57:03 PM by Evilbeard »

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: help on brx plc
« Reply #7 on: April 17, 2017, 01:08:38 PM »
Man, I figured your guys would've nitpicked and critiqued what I did by now! I figured there were probably at least a half dozen things I could've done easier that I don't even know about. I feel like you're slacking off on me. Must be the holiday weekend.

maciek

  • Sr. Member
  • ****
  • Posts: 95
Re: help on brx plc
« Reply #8 on: April 17, 2017, 09:59:40 PM »
wow that worked really well you make me feel like a total noob it is not even funny
but i have one more question is there an easy way to enter all my positions with one numeric entry from c more hmi i could to all 10 with 10 different numeric entries but that would kind of look stupid
again thanks

maciek

  • Sr. Member
  • ****
  • Posts: 95
Re: help on brx plc
« Reply #9 on: April 17, 2017, 10:10:26 PM »
one more question
would i be able to use a recipe from c more hmi to enter all the required positions

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: help on brx plc
« Reply #10 on: April 18, 2017, 02:10:21 PM »
wow that worked really well you make me feel like a total noob it is not even funny
but i have one more question is there an easy way to enter all my positions with one numeric entry from c more hmi i could to all 10 with 10 different numeric entries but that would kind of look stupid
again thanks

One possible way to is to actually make 10 numeric entries. Just only have one visible at a time. When the operator hits a pushbutton, it cycles through the moves by cycling a counter. The visibility option would be referred to the counter.acc (copied to another location like a D or a V memory). You simply just stack all the entries on top of each other. Like so:





Here is a video showing how it would work: https://youtu.be/6XYVG6Kwthg (ignoring the fact that I missed an entry for 6. DO NOT LOOK AT THE MAN BEHIND THE CURTAIN)

« Last Edit: April 18, 2017, 02:17:09 PM by Evilbeard »

maciek

  • Sr. Member
  • ****
  • Posts: 95
Re: help on brx plc
« Reply #11 on: April 18, 2017, 06:25:01 PM »
you r too nice