Help with finding right math equations to use

turner15429

Member
Join Date
Apr 2018
Location
Landrum, SC
Posts
13
Hey guys, I'm programming this stepper motor to go back and forth at two set angles. After programming, I realized that my program only works when both angles are the same. Example 90 and 90 for a total of 180 travel back and forth. I have pictures attached that better explain my program attached. I'm just having issues thinking of a logical way to change my program to get my desired output I'm unsure of what equation I can use... Any help is much appreciated

some insight to my tags and program:
df11 is an angle set by HMI
df10 is an angle set by HMI
sh3h is go to home command
fl is feed to length command it goes to x many steps regardless of position
fl- is opposite direction









 
Last edited:
Your pictures are not showing
Post more information what stepper motor and drive, how is controlled?
The stepper motor is driven by an automation direct SureStep DC advanced microstepping drive 4850 that communicates via rs232 between click PLC and drive. The communication protocol is ASCII

To go into more depth the first move brings it to one angle lets say 90+ deg from home
then after a set time, it goes to -90 deg from home
then after the other set time, it goes back to 90+ deg
until the counter stops
then it gets sent home with the SH3H command
 
Last edited:
Can you be more specific on your desired output? Do you need more than 360 degrees of rotation? Does it need to go between any two angles set in the program?
 
Can you be more specific on your desired output? Do you need more than 360 degrees of rotation? Does it need to go between any two angles set in the program?
I only need up to 90 in one direction and 90 in the opposite it goes to two angles set by HMI. It flexes a cable back and forth for IEEE testing.
can you guys see pictures now?
 
You will need some way to set a home position or 0 degree angle on the HMI (or a sensor to detect home position, which is probably a better option).

You will need to know how many degrees of rotation each step is.

Steps = (Angle) / (Degrees of rotation per step)
Steps to Travel = Current Position + ( Current position - desired position )

The signs here will denote direction and are arbitrary depending on how you chose to set it up, however Steps should always be a positive number given that your desired rotation is between 90 and 0.
 
Last edited:
You will need some way to set a home position or 0 degree angle on the HMI (or a sensor to detect home position, which is probably a better option).

You will need to know how many degrees of rotation each step is.

Steps = (Angle) / (Degrees of rotation per step)
Steps to Travel = Current Position + ( Current position - desired position )

The signs here will denote direction and are arbitrary depending on how you chose to set it up, however Steps should always be a positive number given that your desired rotation is between 90 and 0.


You will need some way to set a home position or 0 degree angle on the HMI (or a sensor to detect home position, which is probably a better option).
already done and works goes to a prox connected to drive it is the SH3H command

You will need to know how many degrees of rotation each step is.
already done and works if you look at logic its 277.777 steps per degree

The signs here will denote direction and are arbitrary depending on how you chose to set it up, however Steps should always be a positive number given that your desired rotation is between 90 and 0.[/QUOTE]
A positive number is cw direction and a negative number is ccw (it goes from -90deg to 90+ deg maximum limits)
 
Last edited:
You will need some way to set a home position or 0 degree angle on the HMI (or a sensor to detect home position, which is probably a better option).
already done and works goes to a prox connected to drive it is the SH3H command

You will need to know how many degrees of rotation each step is.
already done and works if you look at logic its 277.777 steps per degree

The signs here will denote direction and are arbitrary depending on how you chose to set it up, however Steps should always be a positive number given that your desired rotation is between 90 and 0.
A positive number is cw direction and a negative number is ccw (it goes from -90deg to 90+ deg maximum limits)[/QUOTE]

-90 to 90 is 360 degrees of travel. I think you may be wanting to use 0 to 180 degrees as your limits. Also, it would be easier if you reversed your signs so that - is clockwise and + is counterclockwise.

Let me correct this. -90 to 90 is in fact 180 degrees of travel, but you should keep your angles all positive numbers.
 
Last edited:
A positive number is cw direction and a negative number is ccw (it goes from -90deg to 90+ deg maximum limits)

-90 to 90 is 360 degrees of travel. I think you may be wanting to use 0 to 180 degrees as your limits. Also, it would be easier if you reversed your signs so that - is clockwise and + is counterclockwise.

Let me correct this. -90 to 90 is in fact 180 degrees of travel, but you should keep your angles all positive numbers.[/QUOTE]

It is a positive number until it gets to the send command block that puts a - symbol in front of the number to make it go ccw but that's not really my issue I have it partially working already.....
To answer your question yes 180 total -90 is relative to home
 
Last edited:

Similar Topics

Hi all, I'm in the process of upgrading a PanelView1200 HMI program to be developed in FactroyTalk View Studio. The filetype for PanelView 1200...
Replies
7
Views
244
I have reached a dead end trying to find an EDS file. Manufacturer says to contact third party tech support. Clueless. RSLINX can see it, just...
Replies
9
Views
1,754
Hi, I work in a brewery in North Carolina and I need some help finding the output current for a VFD in the PLC. First off I am new to working with...
Replies
5
Views
1,270
Hi all, Where can I find the latest hardware series information on Rockwell's Literature library? Specifically a 1756-85E. I want to know the...
Replies
6
Views
1,940
Does anyone know where to find pre made circuit cards w/ toggle switches on them. Like those ones that the sales people would have on their test...
Replies
1
Views
974
Back
Top Bottom