Motor control program(RSlogix 5000)

Join Date
Feb 2006
Location
casablanca
Posts
39
Hello,
i need to build a generic structure for any motor control application.
I need to know which are the most common and important elements to be considered or just some program examples.
the aim of this structure is to be suitable for any kind of motor configuration.

Any suggestion is welcome
thanks in advance




 
Have you tried doing a search of this forum? This is a very basic thing, you might get more help if you show that you have exerted a little effort on your part.
 
Here is a UDT structure for a powerflex drive. Because of the various ways that a motor may be controlled (contactor, soft start, drive, etc) a truly generic UDT may be difficult to come by.

Data type Name: PFlex_VFD

Description: Full data structure for A-B PowerFlex Drive on RIO

Size : 172 byte(s)

Name Data Type Style Description

ManFwd BOOL Decimal Manually Turn Drive On Forward

ManOff BOOL Decimal Manually Turn Drive Off

ManRev BOOL Decimal Manually Turn Drive On Reverse

InMan BOOL Decimal In Manual

Isolator BOOL Decimal Isolator Status

Interlocked BOOL Decimal Interlock is active when true

Fault BOOL Decimal Device Faulted

LogicFault BOOL Decimal Logically Faulted

Reset BOOL Decimal Reset Fault

AutoFwd BOOL Decimal Run Motor Forward

AutoRev BOOL Decimal Run Motor Reverse

StartTimeDN BOOL Decimal Start Time is Done

Stop BOOL Decimal Output to Stop Drive

Start BOOL Decimal Output to Start Drive

Jog BOOL Decimal Output to Jog Drive

Clear BOOL Decimal Output to Clear Faults

AtSpd BOOL Decimal Drive at Speed

Mux BOOL Decimal C1 DataLink Mux

RIOStatus SINT Decimal RIO Scanner Status

Alarm INT Decimal Drive Alarm Flags

MotorRPM INT Decimal Drive Rated RPM

DriveFault INT Decimal Drive Fault Code

StatusMsg INT Decimal Drive Status (HMI)

FaultMsg INT Decimal Faulted Message

FaultMsgLast INT Decimal Fault Message Last Scan

MessageNo INT Decimal Message Number

MaxStartTime DINT Decimal Maximum Start Time

ParaCountRD DINT Decimal Parameter Read Counter

ParaCountWT DINT Decimal Parameter Write Counter

Load REAL Float Motor Load 0-150% (HMI)

Amps REAL Float Motor Load Current Amps (HMI)

FLA REAL Float Motor Full Load Current Amps (HMI)

KW REAL Float Motor Power Consumption (HMI)

Therm REAL Float Motor Thermal Model 0-100% [HMI]

StartTime REAL Float Time taken for drive to start

InvAmps REAL Float Inverter rated Amps

InvkW REAL Float Inverter rated kW

HSTemp REAL Float Heatsink Temperature C

Speed REAL Float Speed Reference %

MinSpeed REAL Float Minimum Hz

MaxSpeed REAL Float Maximum Hz

NPRPM REAL Float Motor NP RPM

SpdFB REAL Float Speed Feedback RPM

IOImageIN DINT[20] RIO Data

IOImageOUT DINT[20] RIO Data
 
Hello Guys ,

thanks for your interest,

here below the initial structure data i've built:

Name Data type Description
IN_FB BOOL Binary Input feedback motor running
IN_TH BOOL Binary Input motor overload
IN_ONOFFLOC BOOL Binary Input local hand-off-auto (auto=1)
OUT_MLINE BOOL Binary Output motor run to starter

SIM_ON BOOL Binary Simulation on

EN_MOD_SEL BOOL Binary Enable mode change

AMM BOOL Binary Automatic mode status

AUTO_REQ BOOL Binary HMI Automatic mode request

MAN_REQ BOOL Binary HMI Manual mode request

CMD_STOP BOOL Binary HMI Manual stop request

CMD_Start BOOL Binary HMI Manual start request

SEQ_STOP BOOL Binary Auto/sequence stop request

SEQ_Start BOOL Binary Auto/sequece start request

ALM_WORD SINT Binary Alarm word

FB_ALM BOOL Binary Feed back alarm Bit

COMB_FL BOOL Binary Combined Fail Bit

ALM_ACK BOOL Binary HMI Alarm acknowledge

ILB SINT Decimal Interlocks byte (in automatic mode)

IL BOOL Binary Interlock(s) active (in automatic mode)

IL_OR BOOL Decimal Interlock(s) override (in automatic mode)

FB_TIMER TIMER Feedback timer

AUX_TIMER TIMER Auxiliary running/stopped timer

STAT SINT Decimal Status

intern_stop BOOL Binary internal stop bit

intern_start BOOL Binary internal start bit

ons_stop BOOL Binary one shot stop

ons_start BOOL Binary one shot start


this was done according to my little experience and efforts on the subject.This means that there's for sure further steps to take to enhance this work ...

For Alaric,thanks a lot for this informations ,it gives me more ideas about AB drivers..
Any other ideas are welcome
 
Hi,

When building your UDT's make sure you understand how all the member datatypes are placed on byte boundaries. For instance building a UDT as:

BOOL
REAL
BOOL
REAL
BOOL

will create a UDT that is 20 bytes long. If however you ordered it:

BOOL
BOOL
BOOL
REAL
REAL

it would only be 12 bytes long. This can make a real difference to memory usage and scantimes if you are doing a lot of parameter passing to subroutines.
 
If you will look at the bottom of the window in the UDT editor you will see two buttons <MOVE UP> and <MOVE DOWN>. To the left of each member (row) in the UDT editor is a blank square button. If you click this button then you will select that member of the UDT and activate the <MOVE UP>/<MOVE DOWN> buttons. Use the buttons to group members of the same type together. Look right above the UDT members list and you will see something like Data Type Size: ##. As you rearrange the elements click the <Apply> button and note the effect this has on the size of the UDT. Refer to the user manuals about UDTs for more information about optimizing memory when using UDTs. As Philip indicated, its not just about saving memory but also about the impact poorly arranged memory has on program performance
 
Thanks a lot Alaric & Philip for the precious infos.

i've tried this,it works well.

now i still try to get the maximum needed data about motor control,that means all the I/O,Tags,defaults,parameters...and for this i have to figure out all the possible cases(contactor,drive,soft starter...
After this i'll probably try to find out the simple logic to combine the whole elements in one Block.

Is it a good approach?
 

Similar Topics

Hi, Please help me with this PLC interview question. The logic conditions are if any 1 sensor turns on, motor1 turns on and other motors off...
Replies
12
Views
5,654
I've started writing a program and its a sequence of steps that it will go through. The sequence commands seemed a little complex to me so I opted...
Replies
7
Views
8,715
Hi, my project is to program the motor in a grage door using control relay. The thing is that I'm using only one button to make it goes up and...
Replies
23
Views
8,206
Hello i have poblem whit program, i need use 4 ouputs to control motor step left and right, I create program in GX iec developer but his need 8...
Replies
0
Views
2,148
Hi! Can any one help me out on this? I am new to this thing, and I am trying to make a positioning system that has a lead screw whit a 5mm...
Replies
2
Views
2,482
Back
Top Bottom