I have a conveyor design I'm automating. I'm trying to calculate how much torque will be required to move the belt under max load so I can automatically select an appropriate motor/reducer package.
For some reason iLogic is handling the force units in a way that I'm not expecting or understanding.
I should be getting 120 lbforce.
I'm getting 20.445 lbforce.
The variables seem to calculate correctly, the issue seems to come in when I'm trying to set the value of a parameter.
Here is the code I'm using, it's very sraight forward:
Option Explicit Dim renTrq As Double Dim cerTrq As Double renTrq = sweepers/2 * (width2*2/3+14) MsgBox(renTrq) cerTrq = magQty/2 * (width2*2/3) MsgBox(cerTrq) totalTorque = (freeTorque+renTrq+cerTrq)*safetyFactor MsgBox(totalTorque)
Attached is a simplified version of the problem.
Solved! Go to Solution.
Solved by mrattray. Go to Solution.
Not sure if it is your issue but I found sometimes Inventor don't work well with
(width2*2/3+14)
But likes (width2*2) /3 +14
(width2*2/3)
But Likes width2*2)/3
Not sure if this can be same with you but it worked for mine.
Well that's the silly part. It gets that calculation right. It's the line where it's adding together the results that it screws up.
Some research and toying around has led me to believe this is related to my default units setting being something other than lbforce, but I can't find where I can set it or even see what it is currently set to. Does anyone know where I can set unit defaults beyond length, angularity, time, and mass?
They're set to lbforce in the parameters dialog, but I can't find any settings for a default force unit. I think iLogic is converting to some funcky metric unit, like Nmm, based on a default setting buried away somewhere that I'll never find.
I think Inventor is trying to make sense of your units of measure.
First and foremost, torque should be presented as a force*distance, yet you are only showing it as a force. This can cause problems when you try to perform calculations, as is the case in this example.
In your CustomCode rule, as best as I can tell, your calculations for renTrq and cerTrq produce results measured in inches. Then you're adding these two values to a user-defined parameter called freeTorque which is designated as a lbforce. Then this sum is applied to a user parameter field also designated as a lbforce. I'll wager that this inconsistency in units of measure is producing your erroneous results.
Finally, is there some reason for using iLogic for this? Why not just use the parameters fields to calculate the Total Torque?
I know lbmass*ft is what I was really after, but this is my first time playing around with units (in IV) other then length, angle, etc. so it wasn't until a moment ago I discovered I can actually combine units to create "combination" units such as torque.
Anyways, I think you right about the units. I've since changed all the parameters to ul and filtered all of the calculations through variables instead of parameters. This is getting me the results I'm after with minimal headaches.
The model I posted is just an example of what I'm trying to do in a much much larger project, since I'm already knee deep in code and pretty familiar with iLogic I decided it was much easier for me to deal with it all in iLogic. There's also more that's going to be going on with those numbers including some if then statements to select motor reducer packages and generating corresponding bracketry.
This is where I'm at with this paticular section:
sftyFctr = safetyFactor If angle <= 75 Then freeTrq = 20 Else freeTrq = 50 End If renTrq = ((sweepers/2)*(width2*(2/3)+14)) cerTrq = ((magQty/2)*(width2*(2/3))) ttlTrq = ((freeTrq+cerTrq+renTrq)*sftyFctr) totalTorque = ttlTrq freeTorque = freeTrq
Now I just need to calculate RPM from surface speed so I can get HP...
Thanks for the response!
i can certainly understand why you're using iLogic then.
And converting everything to UL should eliminate the units problem, but you'll have to be very careful with your own calculations/conversions now. I prefer working with the correct UOMs in my parameters as they often serve as a passive proof of my own work to make sure I don't drop a UOM accidentally.
...1/2 gig of code and/or modelling? woof. best of luck.
Oh I just want to see the code for picking the motor size. I have an excel sheet that does it but I like what you are doing with it in the model..
I think I can get away with posting that.
I will when I get it working. Why is it so difficult to find a formula for converting surface speed and radius to revolutions? My algebra skills are way too atrophied...
No we just got old and lazy with computers so we forgot how to do algebra. I was helping my daughter and I was like um um um hang on run to other room google search read run back to show her LOL..
In case you couldn't find the formula:
angular speed (in radians per second) = tangential speed (surface speed, in units of length per second) / radius
OR
angular speed (in RPM) = tangential speed (in units of length per minute) / (2 * pi * radius)
I should mention that I found if I do all of my calculations with variables and then assign the parameter to the value of the variable multiplying by 1 of the unit then it works.
someVariable = this * that + somethingElse someParameter = someVariable * 1 lbforce ft
This is what I ended up with. I decided not to automatically select a specific part number, but instead to recommend motor specs.
sftyFctr = safetyFactor renTrq = ((sweepers/2)*(width2*(2/3)+14)) cerTrq = ((magQty/2)*(width2*(2/3))) ttlTrq = ((freeTrq+cerTrq+renTrq)*sftyFctr) totalTorque = ttlTrq * 1 lbforce ft freeTorque = freeTrq * 1 lbforce ft speed = srfcSpeed / 1 ft/min shaftSpeed = Round(speed/((3.92*PI)/12),3)'3.92 is pitch diameter of head sprocket power = Ceil(Round((ttlTrq * (shaftSpeed/1 ul))/5250,4)/.25)*.25 motorHP = power * 1 hp redcrOut = shaftSpeed*.752 'for drive chain reduction 4.319/5.746 = .752 redcrIn = 1725 reducerRatio = Round(Round(redcrIn/redcrOut,4)/10)*10
This is the applicable section of the form.
Can't find what you're looking for? Ask the community or share your knowledge.