|
![]() |
||
MicroLYNX Application Notes & Sample Programs Archive |
||
|
The following example demonstrates set up and use of the MicroLYNX Joystick module.
MSEL=256 'Motor Resolution
Select Variable Values determined in our example by using the IJSC command
(values will very based on the joystick you are using) are: AUNIT=Analog User Units Max Velocity = (Aunit *Munit /MSEL * 200) revs/sec Actual Velocity Joystick count is a Function of the actual joystick position You can type in the values noted above to test and observe how the commands effect and work together. Example: Actual Joystick Count = 1000 Micro Step Per Joystick Count = AUNIT * MUNIT / JSFS Velocity (microsteps per second) = (Joystick Count
JSDB ) * Micro Step per Joystick Count Position of Joystick will determine plus or minus velocity
using Joystick Center (JSC). External DC Voltage Control If you are using a 0-5 VDC signal for joystick operation. You can determine the velocity based on the milli-volts per joystick count. The analog joystick module has a 12 bit A to D converter. The resolution is therefore 0-4096 counts. With 5 VDC and a resolution of 4096 you will get 1.22 mV (5 / 4096 = 1.2207 mV) per joystick count, this is a constant. The JSC command can be set from 0 thru 4096 count. Using the default JSC =2048 you will have 2048 counts to left of joystick center and 2048 counts to the right of Joystick center. On one side of the joystick you have 0 - 2.5 VDC and from the other side of the joystick center you have 2.5 - 5 VDC. The following example will demonstrate how to determine velocity based on analog input voltage. Velocity with 5 Volts DC input. With 5 Volts input the velocity can be calculated by using the following formulas: JSC=2048 The analog voltage is 5 V to the input, with a joystick
center of 2048: Actual Joystick Count = (AIN/AUNIT) * JSFS = 2048 Velocity (microsteps per second) = ((Analog Voltage In / K) - JSDB) * Micro Step Per Joystick Count Velocity (microsteps per second) = ((2.5V / 1.2207 mV) -
20) * 250 Velocity (revolution per second) = Velocity (microsteps per
second) / MUNIT |
||
|
|
||
|
bThe following MicroLYNX sample program shows how to detect a stalled condition by using an encoder motor. VAR Num
'declare variables |
||
|
|
||
|
bMicroLYNX software includes 4 pre-programmed Acceleration Type Variables. These are: Linear, Parabolic, Triangle S-Curve, and Sinusoidal S-Curve. For loads requiring an acceleration profile other than the 4 pre-set standards, a user-defined option is available via the ACLTBL command. The following sample program demonstrates this user-defined acceleration profile command. VAR Num
'declare variables |
||
|
|
||
Flow
Control Using a MicroLYNX
|
Click to enlarge |
|
|
Flow control represents a large potential market for IMS products. The MicroLYNX with the Analog Input/Joystick module is ideally suited for closed-loop flow control applications in industries ranging from medical equipment to bottling. In this case the MicroLYNX has a flow
sensor with a 0 to 5-volt, ( or 4 to 20mA) output connected to an analog
input. As liquid flows past the sensor, the sensor will output a voltage
based upon the volume of liquid flowing past it. The error correction in the system may be accomplished using a PID loop in the LYNX program. As the system starts up, the flow rate will approach a specified value, or the SET RATE. This value will be stored as a LYNX user variable. The voltage seen at the input of the analog module will be sampled periodically and stored to a LYNX user variable declared for the ACTUAL RATE. The program may then use the math functions to calculate the difference between the set rate and actual rate in the fashion FLOW RATE ERROR = SET RATE - ACTUAL RATE. This difference is stored in a user variable set for the flow rate error. The MicroLYNX will position the motor, thus opening and closing the valve, based upon the value of the flow rate error, as the error approaches 0, the motor will stop and wait for the next round of samples. The MicroLYNX will continue to sample and adjust the valve opening to regulate the liquid flow to the set rate. Using the MicroLYNX/Analog input module in this fashion would accurately regulate the flow of liquid through the system. This type of system configuration will work well in flow control applications where the flow of liquid needs to be accurately and consistently regulated. Additional sensors may be connected to the MicroLYNX I/O to control other events in the system such as closing the valve when a reservoir is full, when a leak is detected, or after a specific volume of fluid has passed the flow sensor. Proportional flow control is only one of a vast array of potential applications where the MicroLYNX, and its customizable I/O set, can make the difference for your customers in terms of price, power, and package. |
||
|
|
||
|
bThe following 6 applications are the result of an informal survey conducted by the IMS Applications Engineering Department to learn the most common LYNX/MicroLYNX 1 and 1-1/2 axis applications. The application examples are downloadable in PDF format and contain diagrams, flowcharts and program codes for the applications listed below. The program text file is also downloadable by right-clicking (shift-click for Netscape Navigator users) the text file icon next to the application name and selecting "Save Target As". |
||
|
|
||
|
|
||
|
Factory floors all around you are being automated with Step Motor Controllers and Drives. Manufacturers are seeing the advantages of automation with increased through put and higher consistency in the end product. One very common automation application is called Cut-to-Length. In this application, the IMS Lynx Controller can be used to prompt a machine operator on the factory floor to enter the length and number of pieces to be cut. The application does not specify a Drive, however, the Lynx Controller has the ability to control a number of Drives including Microsteppers, Half/Full Step, Digital Servos and Vector Drives. This application highlights the power of Lynx to serve complex applications. The Lynx Controller's functionally rich instruction set allows machine operators to interface with the Lynx without requiring that they know how to program. The machine operator would only see the data (or text) printed to the terminal. Below, the LYNX Controller demonstrates its ability to print data (or text) to a dumb terminal, prompting the user to set parameters like feed length and quantity of pieces to be cut. Once the length and quantity are entered the machine operator simply pushes a Start button and the Lynx Controller automates the entire process. When the quantity of pieces have been cut the Lynx Controller would prompt for a new length and quantity, starting the process over. Below is the program the System Designer would write for the Lynx Controller. Although the program can be expanded to accommodate other motion control functions in an application, this simplified version shows the Commands used for a machine operator interface application as described above. |
||
| Commands:
IOS
21=0,0,0,0,0,0 |
Comments:
'configure input 21 |
|
|
|
||
|
Notes about Party Mode Communications When a unit has been put into Party Mode, all communications require a Ctrl J (linefeed) to clear the buffer and act as an end of line delineator. Communications then must begin with the desired unit's device name. The device name is the only command in the Lynx software language that IS case sensitive. It can be set either via the Address Switches on the side of the unit, or via the software command DN (for example DN="A" sets the unit to be A, whereas DN="a" sets the unit to be lowercase a). It should also be noted that if the Address Switches have been set to a specific device name, it will override any software set device name. Once the Ctrl J has been issued, each MicroLynx in the system them waits for its device name. If its device name is not the first character it sees, it will disregard all other characters until the next Ctrl J is issued. It is a common practice in Party Mode systems to turn the echo off for the units not directly connected to the PC. This cleans up confusion for units either accepting their commands or waiting for their device name. However, when the echo has been turned off, it will appear that the unit is not communicating. The ECHO command can be turned on by issuing the ECHO = 0 command. This turns on the echo for both RS-232 and RS-485 lines. It should be noted that if the echo is off, you will not see the typed command to turn it back on. Another common problem is when there is a program residing in the problem unit. It may have commands executing such that one does not appear to be communicating when, in reality, there is just insufficient time to input your entire command. This can occur due to a print command in the program, or a hardware switch that is overriding the system (a "start input" for example). Finally, the unit connected to the PC may have been set to have a different BAUD rate than the PC setting. In this situation, you must attempt to establish communications at each available BAUD rate (4800, 9600, 19200, and 38400). Unfortunately, if this is the problem, you may have to attempt each fix at each BAUD rate. The following is a sequence for troubleshooting Party Mode Communications Hardware
Software
Resetting Factory Defaults
Your unit is now set back to the factory defaults. |
||
|
|
||
|
When discussing motion control, there is seldom a clear path to accomplish the desired application. Often the correspondence knows the end result of what the system must accomplish, but is not clear on the decision process of what controller will do the job. Both in the controllers capability and cost. And of course, no two applications are the same, so this phenomena simply repeats itself. The LYNX multi-axis stand alone controller will handle the most demanding single-axis applications as well as many that previously required an expensive multi-axis controller. One example of a multi-axis application is that in which a customer wants to apply an even amount of paint upon a flat surface. The paint is distributed by a human operating a paint gun that is hovering above the product surface on an X/Y Gantry. A constant flow of paint would force the operator to move in very consistent even strokes. Since human error is unavoidable with a constant flow system, the flow must vary with the movements of the operator. Because the movements of the operator are restricted to the X/Y plane, we can generate a velocity feedback from both the X and the Y axis. From the two velocities we can generate a linear velocity based on Pythagorean's Theorem. Sounds like an expensive unit to close the loops and calculate the desired data. If you get a unit that can handle the feedback and provide the math capability, you still need an unit to drive the pump. There are systems that can handle this capability, your boss's jaw will hit the floor when you tell him the price, but this is not rocket science. IMS has an inexpensive system that has proven to be a much more powerful controller than it was intended to be. The LYNX Controller was our solution to this customer's application. We accomplished this application because of the flexibility of the I/O and the power math capabilities. The LYNX has three differential counters available for a combination of high-speed Inputs and Outputs. We used two of these for the X and Y axis and a third will be configured as an output to drive the pump. Now the tricky part. You need the speed of the two inputs. We accomplished this by creating user variables and scanning the two input counters for a change in value. Then we just do the math and the output is a function of these inputs. |
||
|
|
||
|
When you say Multi-Axis, what do you define it as? I define it as Synchronized motion of more than one axis capable of circular and as a minimum linear interpolation. However, most multi-axis applications do not need circular interpolation or synchronized motion. Most of these applications are two axes working sequentially. Users usually have three options. First, they can buy a multi-axis card that simply is plugged into a computer slot. A multi-axis card is a fine solution, but it makes a PC a required component in the system. The second option, a better solution as far as real estate is concerned, is using a stand-alone multi-axis controller. Only this stand-alone has a price tag that will often lean you back towards the bulky PC. Then we have the PLC with the optional motion modules, and though the limited Step Clock Frequency. They work, but the PLC usually requires 24 vdc, and often the Motor drivers want to see more like 45 to 75 vdc. This means two power supplies. Often, PLCs do not give the motion performance required. Users where buying PLCs for the I/O benefits, but were buying IMS microsteppers with embedded indexer to perform the motion. IMS saw a hole in the industry for a quality motion controller that will replace the PLC in most cases, and control up to three axes. It is a stand-alone motion controller that offers up to 24 user defined I/O, and an added bonus; it can run off of the same bus voltage as the motor drivers. The LYNX with its three clocks lends itself to controlling two or three axes sequentially. The following program demonstrates this ability. The demo uses two IM483s and one IB462. Each drive is controlling an M2-2215 motor. Each motor has a turntable, which is divided into 10 increments. The LYNX and the three step motor drivers are all powered from a single supply, the ISP200. The LYNX prompts the user for the X, Y, & Z coordinates, then one at a time each axis moves to its desired position. The program below shows the "makes sense" mnemonic language. The combination of relatively easy learning curve of the software, the noise resilient I/O, and the ability to control several Axes, will assert the LYNX as a center piece of many control systems. |
||
|
|
||
|
The IB Series of Halfstep/Fullstep drives are robust little drives that pack a lot of power into a small package. Using IB drives can provide the most cost effective solution in applications that do not require microstepping. The following application called for moving an adhesive spray head using a timing belt actuator. The stroke length was 3 feet, the spray head was quite heavy and the stop/start distance was less than 1 inch. In order to ensure uniform application of the adhesive, the spray head had to be up to speed over the entire 36 inch stroke. To make matters worse, the motor and power supply had already been selected. The motor was a 23 frame rated at 2 amps and the supply voltage was 36 VDC. After completing the torque and inertia calculations it was apparent that this would be a difficult application. The inertia mismatch turned out to be more than 20:1 and the acceleration/deceleration time worked out to be approximately 50ms. The performance numbers were marginal at best but the only drive that could operate on 36 volts, put out 2 amps and still meet the cost objective was the IB462. An IB462 drive was installed and tested without success. The motor would stall halfway through the acceleration ramp. After making adjustments to the motion profile the slew velocity could not be reached in less than 100 ms. Next, the drive was changed from full step to half step mode. Half step mode produces torque fluctuations not found in full step or microstepping, but it has the characteristic of reducing the effects of motor resonance somewhat. At this point the system could attain slew velocity in 50 ms but not consistently and it tended to overshoot the destination during deceleration. It was apparent that the flexible self aligning coupling that was being used between the motor and load was contributing to the problem. A low cost, rigid, shaft coupling was installed and this was the finishing touch. By using a stiffer coupling the overshoot problem was corrected. The system now met the performance requirements reliably and with a healthy safety margin. |
||
|
|
||
|
Recently, we've been conducting research in the field with our IM483I2 Indexer/Driver for multi-axis machine applications. One in particular is an application that involved rotating a 6 inch diameter plastic disk at 1 RPM for timed light transmission through fiber optic cables. (This is on a special effect device for a large entertainment company here in California.) The customer selected on their own, an Eastern Air Devices NEMA 17" hybrid, driven by the IM483I2 indexer/drive with an IP402 Power Supply. The reflected load inertia to rotor ratio calculated out to 45:1. However, with the speed low and the ramp rate un-important, we determined that the motor was appropriate to drive the load. This particular motor was unipolar (6 leads) with coils connected in series leaving the center taps dangling. The disk was directly coupled to the motor shaft. Initially, the motor ran roughly so we adjusted the step resolution to 1/16. The velocity smoothed out slightly, but not enough to satisfy the customer. Then the current was increased to provide more torque in order to compensate for the large inertia mismatch, but this made the motor run even rougher. We started decreasing the current resulting in a gradual smoothing of velocity. At this point, the step resolution was increased to 1/64th keeping the velocity at 1 RPM, and the wheel started running very smoothly. I continued reducing the current down to 5% and kept the resolution at 1/64th. The velocity was steady enough for a projector light to be shown through the disk, which had a series of holes in various places, creating a twinkling light array through the fiber optic cable. And judging by the twinkle in his eye, it was obvious the customer was pleased that the IM483I2 indexer/drive was able to perform at a very low speed without erratic motion. It's important to remember, when sizing a stepper motor system to consider the velocity and ramp rate the motor will perform at because not all applications require a 10:1 reflected load to rotor ratio. This is a rule of thumb with built-in margin so you don't have to oversize the system. In some applications, (like this one) you can go higher than a 10:1 ratio because the velocity and acceleration rates are low. Also, in certain applications the right amount of current into the motor can effect the velocity smoothness. |
||
|
|
||
|
What
is Noise: Sources
of Noise: Components
of Noise & How to Manage Them: Conducted interference is that which is introduced into a circuit by either direct or indirect coupling. Both direct and indirect coupling are classified into three specific types: Resistive, Capacitive, and Inductive. These types of coupling are most frequent where common return circuits and power supply grounds exist. Conducted interference can originate from a variety of sources, such as relay and switch contacts, fan motors, power switching or digital devices with short rise and fall times. The effect of conducted interference cannot be eliminated as easily as shielding eliminates the effect of radiated interference. Good wiring practices are necessary to minimize Conducted interference. Give close consideration to connections to and from power supplies. Give particular attention to common grounds. Ultimately, the whole system must be referenced to them. (See Rules of Wiring.) How
to Detect Noise: IMS encourages our customers to ask questions and take advantage of our Application Support Team early in your design. We can review your system and make suggestions on the interfacing and wiring practices. We may suggest other tips not listed below that are application specific; but as a starting point refer to "Good Wiring and Shielding Practices" for the basic rules. Good Wiring and Shielding Practices
|
||
|
|
||
|
Many times, more than one technology is suitable for a given motion control application. Pneumatic cylinders are frequently used for simple stroke limited or cut to length applications because of low cost and simplicity. Air cylinders may sometimes be an acceptable solution but they are not always the best. Take the case of a packaging equipment manufacturer we recently worked with. His machine was based on a modular design that could be adapted to different boxes depending on the end Customer. The primary function of his machine was filling, folding and sealing boxes and it worked well. Some Customers needed desiccant bags put in the box before sealing so a separate modular section was added to the machine for this purpose. The desiccant bags come on a reel with a registration hole punched in between each bag. The bags must be separated by cutting at or near the registration hole and then placed one to a box. Air cylinders were used as the feed to length and cutter actuators and a PLC controlled the motion. The PLC took its input from a photo-cell used to detect the registration hole. Relays and solenoid valves on the output of the PLC controlled the air which drove the cylinders. This arrangement worked OK but in order to handle different sized desiccant bags, the machine had to be completely reworked. At 80 bags per minute maximum, the desiccant bag feeder was the limiting factor for through put. In addition to this, the air cylinders were the only things that needed compressed air on the entire machine. Experience with the first machine showed that they were also noisy, dirty, and required regular maintenance. With guidance from IMS, the machine was reworked with a vastly superior stepper solution. The feed mechanism was replaced by a pinch roller driven by an M2-4247-S Stepper Motor and a Panther HI2 microstepping drive. The pneumatic cutter was replaced with an electric cutter and controlled by a relay which was controlled by the Panther HI2 . The Panther was programmed to move at constant velocity until the registration hole was detected. Once detected the drive would advance a fixed number of microsteps from that position, then stop and fire the cutter. The desiccant bag cutter module would now work with any size bag without any adjustments or reprogramming required. This stepper approach resulted in a superior system. Precision was improved and scheduled maintenance was reduced to sharpening the cutter blade. Adaptability to different desiccant bags went from very difficult to completely automatic and transparent. The stepper solution was smaller and required less wiring and panel space. Through put went from 80 bags per minute to 200 bags per minute, and the machine no longer required compressed air. The best news incidentally was that including assembly labor and materials the IMS stepper solution cost about the same. |
||
|
|
||
|
The Automotive industry is exploding with applications perfect for stepper motors. Whether it's in the end product or part of the production process, stepper motors are making it easier for Control Engineers to do their job. Recently, we worked with one such application where a customer wanted to measure the wheel-well height as a quality control check on the assembly line. Using a Panther HI2 Microstepping Driver and a linear actuator, a sensor was used to detect the top of the wheel-well. However, the customer did not want the linear actuator to ever exceed a determined distance which equated to 2000 steps. Using the trip command "T", we set the trip point. Then, moving the actuator at a constant velocity using the "M" command, we looped on one of the general purpose inputs until the sensor detected the wheel-well. The loop "wait until" command, "L2048" allowed the program to fall through when input became true and stopped the motion. Then the "Z" command sent the position to a PLC. If the sensor did not detect the wheel-well, then the trip would stop the motion at 2000 steps, return to start position, and flag the PLC using one of the general purpose outputs that no wheel-well was detected. Overall, the learning curve for the indexer commands was small and the customer was very pleased. |
||
|
|
||
|
Typically, variable speed applications require the use of an expensive controller. However, IMS has an inexpensive Indexer that will control a stepper motor driver. And given the advances in today's digital technology, interfacing a stepper motor system makes for a preferred solution. I recently had a customer who was using our indexer drivers for various other applications. He was so impressed with the ease of programming and interfacing, he insisted on using our drive for this variable speed application. So, we went to work, and came up with a solution. Keeping in mind that the specs on the stepper motors are max ratings, depending on your application, you may need to de-rate the motor. Before power up, a speed range is selected. Then after the ready light is on, the selector switch is put into the Run position and the Start button starts the motor turning. Each range has 40 speeds which are controlled by input 1 and input 2. The selector switch used in this application was a 8 position BCD out, a PLC or equivalent could achieve the same effect. The Speed increase and Decrease and the Start buttons are all momentary switches. It worked great for his application of rotating a product against a grinder, and I had fun figuring out how he could do it.
For assistance, contact IMS applications support: (860) 295-6102, E-mail: etech@imshome.com |
|
|
![]() |
||||
|
|
IMS EUROPEAN SALES MGT. 4 Quai Des Etroits 69005 Lyon, France Phone: +33 / 4 7256 5113 Fax: +33 / 4 7838 1537 E-mail: bmartinez@imshome.com. Sanderson Centre 15 Lees Lane Gosport,Hampshire, UK PO12 3UL Phone: +44 / 0 2392 520775 Fax: +44 / 0 2392 502559 E-mail: mcheckley@imshome.com |
|||