Homepage Download Contract Manufacturing service Typical Applications Bespoke Control Systems Retrofit a milling machine Services for OEMs MAP programming language FAQ About Us Blog Contact Close Menu
Mail Us


TRM International Ltd AMA.
Close

Questions about CNC and programming

What is an Integer variable?

Integers are a type of variables that hold a whole number, and it can not have a fractional part. For example 21 is a whole number and can be stored in an integer. Integer are really reference to memory location that is designated to hold a whole number variables. Integers include two groups these are signed and Unsigned. Unsigned hold bigger numbers (to the power of 2 bigger) but this type can only hold positive numbers. Signed can hold positive and negative values.

What is a floating point variable?

Often we need to use a number that can hold fractional numbers such as 21.35 or 0.2, a variable that can hold this type of value is called a “floating point”. A floating point variable is typically 32 bits, there are also 64 bit double floating point, these offer more precision, but in most industrial applications these are not needed. Floating point numbers are complex they have a fraction (23 bits) a exponent (like in logs) and bit 31 is the sign bit. Floating point is accurate over around 10 digits after which a float is an approximation and a double should be used.

What is a string?

Printable characters are normally stored in “strings”. A string is a collection (called an array) of bytes stored at consecutive memory locations. A string can hold any digital data!

What is a pointer?

Pointers are variables that are used to point to a block of memory. These are the most difficult variables to understand. However think of these as a book mark, it is like saying “page 99” for example. Pointers are used to give the start of a memory location. Pointers should always unsigned integers. Pointers can point to any of the data types, however a pointer to a floating point is still a unsigned integer.

What is CNC?

CNC means Computer Numerical Control, literally is means that a computer is controlling a machine and that computer can follow instructions that are written in a binary or text form. Many CNC machines actually mean that they can be programmed using a text file with a code called "G code". G Code uses a series of instructions that start with a G such as G0 for rapid move. For example G0 X100 Y50 Z10 means rapid mode to position 100 in the X dimension, 50 in the Y dimension and 10 in the Z.

What is G Code CNC?

G code is a system where movements of a machine are listed in a text file. Normally G Code is written from a post processor or using a text editor. This enables computer aided design systems to produce a cutting list, where all the machining is defined by G code commands.

Read more about G code:

Most G code command start with a G (which can be upper or lower case), the character G is followed by a number like 0. The vast majority of commands that cause motion begin with a G. There are other commands that begin with other characters such as F, S and M.

  • G codes cause motion or alter motion parameters. Example G1 X10 Y5 Z-1
  • M codes are for miscellaneous are used to control non motion issues such as turning coolant on etc. Example M5 stop spindle
  • F is for feed rate. This sets the speed of the feed moves example F1200 (set the speed to 1200 per minute)
  • S controls the spindle. The S command can change spindle modes like the speed, direction and on or off.
  • X designates a position for the X axis.
  • Y designates a position for the Y axis.
  • Z designates a position for the Z axis.
  • P dwell or number of turns parameter.
  • R normally used for radius.
  • T is for the Tool number.

In CNC what is an origin?

G code commands are mainly absolute, that means they specify a fixed distance from zero. If we want to work in the middle of a sheet of material, that would not be possible as we would be working at 100 units from the zero position. To get round this problem we use origins, these can be thought of as start position of the product. Origins are actually a false zero that allow G code to work at different locations on a machine. Normally there is a procedure or menu for setting the origins, in map there is a specific menu that is used to set the origins. To set the origins normally means moving the machine to the point at which you wish to be regarded as zero and pressing a zero button.

What is the MAP programming language?

Map is a programming language that is very powerful and fast, it was designed for people that are not programmers and therefore is easy to use. Map is capable of being used in very advanced applications, because it is a vectored language it is predictable and very fast. MAP allows G Code to be imported and map can be written using a CAD system and imported as a map program. This allows complex motion profiles to be designed with ease.

Is the MAP only for motion control?

MAP is a vectored language, ideal for motion control, but it can be used in almost any industrial application. There are commands for many non motion control applications such as data logging. MAP is ideal for wide range of applications.

Questions about Power and mains supplies

What is single phase power?

Single phase power is the supply that most homes have, normally the supply voltage will be 120V or 220V and the frequency is either 50 or 60 HZ. A single phase supply is taken from one of the three phases of the generator this is the live connection. One side if the windings are all joined together and this is connected to ground this forms the neutral connection of the supply.

Read more about single phase power:

Power is generated when a wire passes across a magnetic field. All motors can generate electricity. In public power generation there are 5 wires these are 3 lives a neutral and a ground connection. Power is delivered in single phase supplies between neutral and one of the 3 phases. The output of each phase is sinusoidal like the one shown below:

single phase power

What is three phase power?

Power is generated in three phases because the generator has three windings that are 120' apart. Most industrial units have 3 phase power, as this is better at driving motors and it is a way of trebling the power available. Companies are required the try to balance the load on each phase as the generators need each phase to be used as equally as possible. Public supply voltages world wide will be normally be 380V or 415V or 550V and the frequency is either 50 or 60 HZ.

Read more about Three phase power:

Power is generated when a wire passes across a magnetic field. All motors can generate electricity. In public power generation there are 5 wires these are 3 lives a neutral and a ground connection. Power is generated in three phases, this is because there are three sets of coils (wires) on the generator rotor. The output of a three phase supply is sinusoidal and is shown below:

three phase power

Why do I need a mains filter?

There is a legal requirement for equipment not to cause mains supply disturbance, this means not to cause waveform distortion, or cause high voltage pulses. Unfortunately some equipment can cause high voltage spikes or pulses, these pulses can damage equipment, filters protect your equipment, from incoming transients and nasty noise on the mains supply, it also prevents noise from your equipment from radiating down the mains.

How do I switch single phase mains?

On a properly configured single phase mains supply the neutral is connected to earth, and is therefore safe. Therefore on single phase systems it is safe to switch only the incoming live. If you intend to switch the neutral wire you must also switch the live (this is called dual pole switching), in some countries it is possible to connect the main plug in either way round, in such cases it is important to switch both live and neutral. This is called dual pole switching, NOTE EARTH IS NEVER SWITCHED.

Questions about Sensors and PWM

What is a proximity switch?

A proximity sensor is a device that is used to detect the presence of nearby objects (called the target) without any physical contact. Proximity sensors are normally in four main groups, the most common is the inductive type that is used to detect the presence of metal objects. For non metallic targets infrared is commonly used, hall effect is used where it is practical to fix a magnet to the target and the less common type uses capacitance. Proximity sensors offer high reliability and long life because of their non contact nature. Most proximity switches use 3 wires and operate off 24 volts, there are two output types these are NPN or PNP where NPN when active connect the output to the 0 volt rail, PNP when active the output is connected to the 24 Volt rail (it outputs 24 volts). Note both types when inactive are effectively open circuit. It is also possible to get two wire sensors these indicate output by changing it's output current, when the device is inactive the current is low and when the device is active the current level is high.

Can I use MAP to control temperature?

Yes the next version of MAP to be released will include PID loop control. There is already provision to calibrate and analogue input, when an input is calibrated it becomes type cast to temperature, pressure, voltage current flow etc. Once an analogue input has been calibrated it can be associated to a PID channel and therefore the controller can be used to replace many conventional instruments.

What is PWM?

PWM means "Pulsed Width Modulator", this is a device that is use to create pulses of variable width. Two counters are fed from the clock supply, one is loaded with the "pulse value" set by the user and the other is one counts the the full value (normally 256 for 8 bit). Every clock pulse causes both counters to down count by one count on each, when both counters vale a value greater then zero the PWM will output a logic 1, when the user loaded counter reaches zero the output will be zero. The other important characteristic of a PWM is that it's frequency can be changed. Normally the clock rate can also be changed so changing the output frequency.

Can PWM be used for?

PWM can be used to digitally encode an analogue voltage. For example a zero voltage can be represented by a 0 value in the load register, while 10 volts might be 255. PWM is commonly used to control inverters for control of spindles on milling machines and routers. PWM can also be used to make sounds and it can also directly control output devices such as motors and inductors.

What is a PID loop?

PID is a control loop that uses a mathematical algorithm to effect control. The term PID means "Proportional–Integral–Derivative" this basically is a controller that uses three or more terms. Basically the major term is based on the set point minus the actual reading multiplied by a gain factor, the other terms ensure loop stability. PID is widely used in industrial control systems such as temperature controllers and a variety of other applications requiring continuously modulated control. Nowadays almost all digital controllers use a PID concept in applications from motion control, temperature, pressure and even auto pilot systems all of which require accurate and optimised automatic control.

Questions about motors and torque

What is Torque?

Torque is literally a force that causes an object to turn. Imagine a spanner turning a nut.

Motor Current Torque and power supplies

Engineers often get confused between motor ratings and the amount of power the power supplies need to provide. In most cases the answer is that the capacity of the power supply can be considerably lower than first thought. This is because the power used by the system, is the power needed during the constant velocity stage of the motion cycle. During the acceleration stage of the motion cycle the motor is often running at or near maximum stall current, but as the system reaches the constant velocity stage, the current will normally drop considerably. Some applications such as extruders are the exception they use a high torque most of the time. However it is not recommended or theoretically impossible to have the system that uses full torque throughout the whole cycle, this is because it could never accelerate. It is essential to ensure that there sensible reserve of torque (e.g. never use more than around 75% of full torque when the cycle is in the constant velocity stage of the motion cycle).

Read more about torque & power:

In order to decide how much power is consumed by a machine during a movement, it is necessary to analyse what is going on and how much work is actually being done. Most machine manufacturers try to use the smallest and therefore lowest cost motor is possible, this is obviously common sense it also saves energy. Larger motors have much larger masses and therefore inherently use more energy during acceleration and deceleration.

However the vast majority of processes use very little actual power. For example if the stall current on a particular motor is 10 A and the motor runs at a hundred volts many people will simply multiply the voltage by the current and calculate 1000 W. This might well exceed the rating of the motor. In the vast majority of motion control applications the majority of current usage occurs during acceleration in which case often the current exceeds the motors maximum. However during this maximum current the voltage across the motor will be low and therefore the current is high and voltage low equals low power. In very few applications does the motor operate at high torque throughout the entire cycle. Inside the drive there are capacitors, these capacitors store energy and when the motor demands high current, energy is taken from the capacitors which can supply considerable current spikes. In effect they can be thought of as converting voltage to current. Therefore a motor that can be drawing 10 Amps might only draw one from the supply.

However where the motor is on continuous load in applications such as extrusion it is important to remember that the motor will be running at high speed and high torque. In order to run at high speed this will require a high-voltage, and a high torque requires a high current therefore the power consumption will be high. In this type of application the power supply should be rated higher than the maximum rating of the motor. However if we imagine the normal motion control application the loads can be very low therefore the voltage across the motor may be high but the current will probably be low. In this type of application when the current is high the voltage will be low and vice versa. In this type of application it is possible to calculate the current draw and calculate your power supply accordingly but often the power supply can be rated at 50% or so of the motor rating this saves an enormous amount of money.

What is a following error on a motion controller?

Following errors are normal in servo systems, it is a following error that causes motion on motion control systems they are normal. Although there is always a following error
Read more about following Errors:

When a motion controller needs to cause motion in conventional motors, it does so by producing a voltage which is equal to the current or the velocity demand that the controller has calculated is need to make the motor move. Depending on the way that the drive is set up, that voltage applied by the controller is equivalent to the current (current mode) that the drive will endeavor to apply to the motor or to the velocity desired (velocity mode).

This signal is proportional principally to the position error multiplied by the gain, it therefore follows that to cause motion there must be a following error. A following error is a normal for a servo motor that is moving. A motion controller operates on a regular time period often called a “sample period”, the position errors will accumulate and this causes a high demand voltage to be output. Depending upon the response time of the servo motor and drive this following error can easily equal the accumulated error from several sample periods. It is not uncommon for this error to be that of 5 or more sample periods. This is worth while considering when setting a following error limit in your motion controller, setting this too low may result in false tripping, set it too high and it may have a limited effect.

What is DC Servo Drive?

A DC servo drive is a device that controls a DC servo motor or a DC motor. There are normally two major modes of operation, these are current mode and constant velocity. A servo drive converts a command signal to a motor drive to cause motion.

Read more about DC servo drives:

When a motion controller needs to cause motion in conventional motors, it does so by producing a voltage which is equal to the current or the velocity demand that the controller has calculated is need to make the motor move. Depending on the way that the drive is set up, that voltage applied by the controller is equivalent to the current (current mode) that the drive will endeavor to apply to the motor or to the velocity desired (velocity mode).

The DC servo drive is normally a device that controls the current to the motor. There are two main types these are four quadrant or two quadrants. Four quadrants are famed for being more stable but are a lot less efficient. Quite simply when there is a motor command signal the drive uses the inductive nature of the motor to drive a pulsed width signal to the motor to control the current in the motor. All drives have a current control circuit and some also have a velocity control circuit. Where the drive aims to control velocity it must have some form of feedback normally these are Tacho generator or encoder. In the velocity mode the current applied to the motor depends upon the velocity where when the velocity is low the current will be high and vice versa. In systems with a motion controller current mode, where the current is proportional to the control voltage is the preferred option.

How do I install a motion controller for CNC welding applications

Most welding applications are quite easy to setup and run, the PMC4 is an ideal motion controller for welding applications. Working with Plasma cutter or TIG welders is more challenging because of the startup conditions. Read more about CNC welding applications:

The startup phase of a Plasma cutter or TIG welder involves can involve a high frequency signal that is also at a high voltage. In reality this is like a small transmitter, many welders also change the frequency cyclically, so they are likely to find a susceptibility in any wiring. Because of this susceptibility there is a need to shield all the cables and to make sure that even the motor encoders are shielded if not the encoders may become influenced by the startup signal. A very important thing is to ensure that electronic devices are shielded behind metal enclosures that are well grounded to a star ground. Only use shielded cables and make sure that they grounded at one end and connected to the star ground. it is also a good idea to shield the welding cables, but this must be done with great care as the shielding may effect the startup circuits of the welder. Maybe consider the use of flexible shielded trunking for the welder.

Questions about wiring

Why should signal wires be screened?

Analogue and sensitive signals are susceptible to electrical noise. This noise can make measuring signals unreliable, for example a motion control axis can become unstable because of noise being picked up by a servo drive. Many people will have heard microphone hum on audio systems, this can be reduced by adding a shield that covers the signal wires. This shield reduces or prevents signals being picked up by capacitance, and can make a big difference to noise levels in signal cables.

What is a ground loop?

Motion controllers and automation systems use sensitive analogue signals. To protect these analogue signals from being influenced by other signals such as hum and whistle in the case of audio signals, an outer connection which is made out of foil or braided wire is often included around the cable or groups of conductors. This is commonly called a shield and its purpose is to provide a barrier reducing the amount of noise or other signals often called "crosstalk" that effect sensitive signals.However if current is allowed to flow in the screen it can actually make things worse therefore grounding a screen at both ends is not recommended this is called a ground loop.

Read more about ground loops:

Ground loops can be avoided by connecting the screen at only one end. It is good practice to try and have all the screens connected to the same point this is often called start point and it should be connected to earth. It is very important therefore to ensure that the screens are connected at one end. People often think that a big machine made out of metal will not have a voltage across it and therefore connecting the screen at both ends will have no effect. Unfortunately this is absolutely not true especially where high-frequency signals from motors et cetera are concerned. High frequencies can regard solid lumps of metal as a very high impedance and therefore considerable voltages can occur across a seemingly solid lump of metal.

A good way of testing is to use an oscilloscope. However connecting screens only one end normally will eliminate all ground loops. There is a black art to getting rid of noise in digital and analogue systems, it can be extremely difficult to get systems to work especially in noisy environments. It is therefore recommended that noisy signals such as motor commutation are kept as far away from sensitive signals as possible. It is a good idea to put screened cables in a metal trunking as this enhances the screening. Connecting the screen at both ends almost always causes problems as does multiple connections to the screen which must always be avoided.

What is the difference between PNP and NPN sensors?

Most sensors have 3 wires these are 0 volts, a supply wire (normally 24 volts) and a signal wire. In NPN sensors the signal wire is open circuit when the signal is not active and shorted to 0 volts when the senor is active. In PNP sensors the signal wire is open circuit when the signal is not active and shorted to the supply voltage when the senor is active.

What is a quadrature encoder?

There are a minimum of two outputs from an incremental encoder that form the distance measuring part of the output signal. These are the A and B signals. These two signals are 90 degrees out of phase with each other. The encoder therefore sends out two signals each of which has a rising and a falling edge, counting each edge therefore gives 4 electrical pulses to each mechanical pulse. which is what quadrature means, most rotary encoders are rate in pulses per rev (PPR) and the output gained from this is the PPR x 4, for example a 1000 PPR encoder gives 4000 electrical pulses. These signals are decoded to produce a count up pulse or a count down pulse.

Read more about quadrature encoders:

When the encoder is turned in one direction the A pulse leads the B and when the encoder is reversed the B pulse leads the A. The decoding device in the controller uses this fact to properly encode the distance measured by rotating the encoder. To make the signal more robust most encoders have tow more signals these are the Not A (A\)and Not B (B\) signals, there is nothing special about these signals they are simply the A and B signals inverted. The receiving device uses the polarity of both the A and A\ to determine the real status of the A signal as it does for the B signal. If noise is present in the A signal is is likely that the A\ will suffer the same disturbance and so the noise signal will have no effect overall.

Some encoders also have a signal that is only active for one pulse per revolution this is known as the Z pulse, the reason that this pulse is provided is that the exact rotational relationship is know relative to the mechanical position of the encoder. Normally on initialisation the Z pulse can be used so that when the axis moves off a switch away from home the Z pulse is used to reset or set the encoder counter to a known point normally zero.

pulse diagram

What is best way to wire a motor or servo motor?

A servo motor is one of the most difficult things to wire. This is because the motor power is delivered in two, three or six wires. These wires normally have high voltages and frequencies associated with them, even if these wires are screened they can still cause disturbances to other signals. A very good way to avoid problems is a separate wiring into two sections, these sections should be separated by at least 20mm. Power cables should be wired in a "dirty" loom while signal cables should be wired into a clean loom.

Questions about ProCut

How do I reset a maintenance message on Procut?

Guillotines need regular maintenance in some countries such as the UK servicing a guillotine is a legal requirement. Once the machine has been serviced you can reset the service record using the following method. NOTE DO NOT RESET THE SERVICE RECORD UNLESS THE MACHINE HAS BEEN SERVICED AND IS SAFE. From the welcome screen select F5 (the tools icon) enter the password 3142. From the technical menu select Service menu. From the Service menu select service record. In this menu select F7. Type the password in again and select the service settings you need this will reset the machine.

Can I use my original motor on Procut or do I need to use a servo motor?

Yes you can use your original motor with ProCut, however this is often more difficult to do because you have to fit an encoder to the lead screw. ProCut requires the use of a flux vector inverter, these offer a good level of control. You can achieve a good level of precision using a good quality flus vector inverter. However the performance of a standard 3 phase motor is much lower than a servo motor, and a servo motor kit is often easier to fit

Frequently asked questions about upgrading a machine currently fitted with a Anlilam Controller to a PMC4.

LVD 2014/35 EU Low Voltage Directive

The EU rolls out new rules to prevent unfair competition, as of April 20 2016 there is a new version of the Low Voltage Directive (LVD). This new law effects electrical equipment designed for use with a voltage rating of between 50 and 1000 V for alternating current and between 75 and 1500 V for direct current, other than the certain specified equipment. This directive is designed to enhance safety and prevent unfair competition in the market, so is likely to be good news for us that manufacture equipment in the EU and bad for companies that import cheap products from the far east. Please clip below to see some of the key points:
Read more

Product marking: The important point is that there must be specific numbering must allow making a clear link to the relevant documentation that demonstrates the conformity of the specific type of product, in particular the declaration of conformity.

Manufacture and product information: Importance is given to the numbering system and making a clear link to the relevant documentation that demonstrates the conformity of the specific type of product, in particular the declaration of conformity.

Manufacture or importer marking: The manufacturer or importer must indicate their name, registered trademark and Name and address on the product. Article 6.6 (3) a single contact postal address on the product or, when not possible If lack of space, would be possible to indicate the name because of the size or physical characteristics of the product, on its and address within the product? packaging and/or on the accompanying documentation.

Safety instructions: Instructions and safety information need to be provided, whether the Instructions and safety information product is intended for consumers or other end-users. The Low Voltage Directive does not make a distinction on who is the user of the product. The documentation should include all the necessary information for the safe use of the product, to enable the user to assemble, install, operate, As Low Voltage Directive covers safety matters only, store, maintain, repair, and dispose of the product.

Importer: “Before placing electrical equipment on the market to keep it for 10 years after a product has been placed on the market. Article 8.2 importers shall ensure that the appropriate conformity assessment procedure has been carried out by the The importer does not have to have a copy of the technical documentation manufacturer. They shall ensure that the manufacturer has but has to ensure that the technical documentation can be made available to drawn up the technical documentation, that the electrical the competent national authority upon request. Equipment bears the CE marking and is accompanied by Even if there is no explicit obligation, the importer is advised to require the required documents, and that the manufacturer has formal assurance in writing from the manufacturer that the documents will complied with the requirements set out in Article 6(5) and be made available when requested by the surveillance authority. But the (6)” technical documentation can be given directly by the manufacturer to the surveillance authorities. What is important is that the authorities receive the How do we interpret “the market importers shall documentation and that at importer's request the manufacturer provides the ensure”? Does it mean that the importers must have a information to Member States. Copy of the declaration of conformity and the Technical Documentation?

Instructions article 8.4: “Importers shall ensure that the electrical equipment is the instructions and safety information. Manufacturers, importers and accompanied by instructions and safety information in a distributors have the obligation to ensure that the product is accompanied language which can be easily understood by consumers by instructions in a language which can be easily understood by consumers and other end-users, as determined by the Member State and other end-users, as determined by the Member State concerned.”

Technical Data: “Directive 2014/35/EU Annex III.2 requires from the documentation start a risk analysis of the specific risks of the product to address them in manufacturer to include an appropriate risk analyses and order to comply with the essential requirements of the Directive because Annex III.2 evaluation in the technical documentation without providing any further details.”

All this means is that if you buy equipment it should have a risk assessment and that with this risk assessment you do not need to do your own risk assessment. This is good news for all companies that buy equipment

What does this mean to machine builders? Basically most things concerning machinery are covered in the machinery safety directive. But in some respects the directives overlap and so the best this is to make sure that where possible electrical items in reach of the operator are low voltage and pose no risk of shock etc.

.

Do I need a Risk Assessment?

The short answer is yes: “If you are an employer or self-employed. It is a legal requirement for every employer and self-employed person to make an assessment of the health and safety risks arising out of their work. The purpose of the assessment is to identify what needs to be done to control health and safety risks.  Regulation 3 of the Management of Health and Safety at Work Regulations 1999.” (From the Health and Safety Executive Website - http://www.hse.gov.uk/risk/faq.htm#q8 ). Written by Businesswise Systems Ltd

Read more

This means that you need to consider the safety of your employees and other persons not in your employment arising out of or in connection with your undertaking. Failing to carry out proper risk assessments could result in accidents occurring and injury to people or property. Such damage might constitute criminal offenses. This is so even if no harm was caused. In February 2016 tougher sentencing guidelines were introduced, including Corporate Manslaughter and Food Safety & Hygiene Offenses. In the most serious of cases this could result in your business being closed and custodial sentences if a Director of a company is found to be guilty of “consent, connivance or neglect.” Accordingly, be prepared. Seek advice and properly assess risk and procedures to protect your business, staff and persons coming into contact with your business. Businesswise Systems will be pleased to provide a free 30-minute telephone consultation and review your health & Safety needs. Please call on 07805 658299.

TRM logo

Frequently asked questions

TRM Electronics aims to be a socially responsible organization that is involved in education and cancer research. The company has invented some new cancer treatments and aims to provide services and products that will benefit society and reduce energy consumption.

Back to top

Contact us!

Twitter Email
Close