background image

CY545 Stepper System Controller

                                           

www.ControlChips.com

© 2002 Cybernetic Micro Systems

Chapter 6 - Bit Function Commands

21

Bit Function Commands

Several commands allow you to specify which User Selectable Bits are used by the command.
The CY545 has at least six general purpose signals available, even if all hardware support
options are used. More bits are available when some hardware support, such as the Hewlett
Packard LED display, the CY233, or the parallel interface are not used. Each of these
commands includes a parameter which specifies which bit or combination of bits to use with the
command. The specific values are discussed with the relevant commands.

User Bits

One command allows you to set or clear specified bits. It is:

B Bit

Set or clear specified bits

When in the ASCII mode, this command also allows a special format, using a complement prefix
to mean the inverted value of the specified bit parameter. The prefix is the “/” character, and is
used as follows:

B 2<cr>

Set User Selectable Bit 2 high

/B 2<cr> 

Clear User Selectable Bit 2 low

The same function may be performed by the bit parameter value. When a “/” character is
detected, it simply complements the fourth bit of the bit value parameter, so the same functions
as above can be specified by:

B 02H

<cr>

Set Bit 2

B 12H

<cr>

Clear Bit 2

The “/” character is equivalent to performing an exclusive OR (XOR) of the bit number
parameter and the value 10H (16 decimal).

The value of the Bit parameter will determine what action to take, as follows:

00H to 07H

 

(

 ..

0-7)

  

Set one of user bits 0 to 7

08H to 0FH

 ( 

.

8-15)

  

Set one of data bus bits 0 to 7

10H to 17H 

( 16-23)

..

Clear one of user bits 0 to 7

18H to 1FH

 

( 24-31)

..

Clear one of data bus bits 0 to 7

20H to 3FH

 ( 

32-63)

.

(Same as 00H to 1F)

40H to 7FH

 

.

( 64-127)

.

Set user bits 0 to 5 at one time

80H to 0BFH

.

(128-191)

.

AND user bits 0 to 5

0C0H to 0FFH

.

(192-255)

.

OR user bits 0 to 5

As seen from the above values, the bit argument is composed of an “opcode” part and an
“operand” part. The general coding of bit arguments is shown below:

C

C

C

H

H

H

A

A

A

P

P

P

T

T

T

E

E

E

R

R

R

 

 

 

6

6

6

 

 

 

-

-

-

 

 

 

B

B

B

I

I

I

T

T

T

 

 

 

F

F

F

U

U

U

N

N

N

C

C

C

T

T

T

I

I

I

O

O

O

N

N

N

 

 

 

C

C

C

O

O

O

M

M

M

M

M

M

A

A

A

N

N

N

D

D

D

S

S

S

Summary of Contents for CY545

Page 1: ...CY545 High Performance Stepper System Controller ...

Page 2: ...ght to revise this publication and to make changes from time to time in the content hereof without obligation to notify any person or organization of such revision or changes and Cybernetics assumes no responsibility for any errors which may appear in this document and makes no commitment to update the information contained herein Because of the wide variety of applications in which this product m...

Page 3: ... J PLCC Pin Descriptions 7 Chapter 3 Command Interfaces 11 Command Interfaces 11 Parallel Interface 11 CY545 Interface to CY233 Network Control Chip 11 The CY545 Serial Interface 12 Chapter 4 Command Summary 15 CY545 Command Summary 15 Command Formats 16 ASCII Command Format 16 Binary Command Format 17 Chapter 5 Motor Control Commands 18 Motor Control Commands 18 Set Stepping Rate 18 Set Count and...

Page 4: ...splay 38 LED Display Details 39 Chapter 11 CY545 Example Circuits 40 Three Example Cases 40 CY545 Example Circuit Minimum Serial Configuration 40 CY545 Example Circuit Minimum Parallel Configuration 41 CY545 Example Circuit Maximum Configuration 42 Chapter 12 External Memory Support 43 Memory Read Write 43 Auto Start Feature for Stand Alone Operation 44 Chapter 13 Thumbwheel Switch Support 46 Thum...

Page 5: ...cceleration Curve as a Function of R 76 Slope and Elapsed Time 77 CY545 Slope Curves 78 CY545 Step Rate Table 11 MHz 81 CY545 Step Rate Table 12 MHz 82 CY545 Step Rate Table 14 75 MHz 83 CY545 Step Rate Table 16 MHz 84 Chapter 18 Electrical Specifications 85 CY545B Electrical Specifications 85 Electrical Conventions 85 Reset Circuitry 85 Clock Circuits 86 Chapter 19 Circuits and Examples 87 Variab...

Page 6: ...t computer that issues single commands or sequences of commands as a program to the controller and then tends to other system functions while the Stepper Motor Controller is running the motor Maximum performance is gained when the host CPU is closely coupled to the Stepper Motor Controller IC While the CY545 is also capable of working with a host CPU in a closely coupled fashion the CY545 contains...

Page 7: ...s allow acceleration from the starting rate to the final rate followed by an indefinite run length Internal step position updated during all motions Motor Support Signals Step Pulse and Direction signals work with standard power driver modules Internal or external direction control Forced ramp down and abort signal for emergency or externally controlled end of motion Separate CW and CCW limit sign...

Page 8: ...optional external setting of parameter values through standard thumbwheel switches Selectable display for output messages from standard serial standard parallel or CY233 interfaces plus special support for a parallel HP HDSP 211x LED display or a CY325 based serial LCD display User controlled multi purpose I O lines for set and clear bit functions test bit and branch functions wait for bit value f...

Page 9: ...CY545 Stepper System Controller www ControlChips com 2002 Cybernetic Micro Systems Chapter 1 Introduction to the CY545 4 CY545 Stepper Motor System Controller ...

Page 10: ...s com 2002 Cybernetic Micro Systems Chapter 2 Pinout Package Overview 5 CY545 Dip Pinout Dimensions C C CH H HA A AP P PT T TE E ER R R 2 2 2 P P PI I IN N NO O OU U UT T T P P PA A AC C CK K KA A AG G GE E E O O OV V VE E ER R RV V VI I IE E EW W W ...

Page 11: ...CY545 Stepper System Controller www ControlChips com 2002 Cybernetic Micro Systems Chapter 2 Pinout Package Overview 6 CY545 J PLCC Pinout Dimensions ...

Page 12: ...as been reached The CY545 will not continue stepping in that direction until the limit signal is removed Normal stepping is allowed in the opposite direction DIP PLCC Pin Name Description 6 7 I O JOG Manual stepping control This signal is the manual stepping control input When it is floating the CY545 will not jog However if the signal is connected to ground the CY545 will jog in the CW direction ...

Page 13: ...l is driven low when a parallel command is issued to the CY545 It is used as part of the parallel command handshake If the parallel command function is not used this signal may select a fixed serial baud rate as follows 0 300 baud 1 2400 baud F 9600 baud DIP PLCC Pin Name Description 14 16 I O XMEM_SEL External local memory select This signal goes low when the CY545 reads or writes to the local ex...

Page 14: ...bit 2 24 27 I O USRB3 User selectable function bit 3 25 28 I O USRB4 User selectable function bit 4 26 29 I O USRB5 User selectable function bit 5 27 30 I O USRB6 User selectable function bit 6 or FPL or CTS 28 31 I O USRB7 User selectable function bit 7 or HP_SEL This group of signals is used for multiple user selectable functions including bit set and clear bit test and branch wait for signal va...

Page 15: ...38 42 I O D1 Parallel data bus bit 1 39 43 I O D0 Parallel data bus bit 0 LSB This group is the parallel data bus used to read or write parallel data During access to external thumbwheel switches memory or display the lower byte of the device address is presented on these lines just prior to the data transfer Parallel commands are also accepted by the CY545 on these lines using the handshake contr...

Page 16: ...and characters have been issued to the CY545 In direct command mode the CY545 executes every command as it is received This means that the CY545 will go busy for a longer period of time with the last character of a command while the command is actually executed For long time delays or long motions this time could be many seconds This parallel interface is compatible to that of other CYxxx control ...

Page 17: ...hich may be connected to a host computer or terminal Since the CY545 signals are all TTL voltage levels external RS 232 line drivers and receivers must be provided to translate the RS 232 voltage levels to the CY545 TTL levels A Maxim MAX 233 does this function in a single chip operating at 5 volts This interface is also shown on the applications schematic The serial interface may be operated in o...

Page 18: ...ve serial mode is chosen by default when the BUSY signal is left floating so the CY545 can drive it at power up In this mode the serial baud rate is not set until the CY545 receives two carriage return codes Be sure to send these characters after power up or any reset hardware or software Once the two carriage returns have been received normal CY545 commands may be sent When working with the seria...

Page 19: ...racters Finally the CY545 optionally implements a Clear to Send signal CTS which may be used by the host system to indicate when the CY545 is busy processing a command No additional characters should be sent to the CY545 while CTS is off TTL high Once the CY545 has finished processing the current command CTS will be enabled again indicating that the CY545 is ready for more serial characters The po...

Page 20: ...r starting step rate G Go step Starts relative mode stepping H Bit Seek Home using specified bit I Initialize controller perform software reset J Addr Jump to byte address of current memory page L Cnt Addr Loop to byte address for specific count N Num24 Set Number of steps for relative motions O Mode Set Operating mode of CY545 P Pos24 Step to specified absolute Position Q Quit entering commands t...

Page 21: ...with the ASCII carriage return character shown as cr in the following examples Commands without parameters such as the Go command use only the command letter followed immediately by the carriage return For example G cr Go command no parameter I cr Initialize command no parameter Commands with parameters may use two formats for the parameter values in the ASCII mode a decimal format consisting of t...

Page 22: ...ntry of commands into external memory should not be followed by any data count This command is immediately followed by the ASCII letter of the next desired command Also the Stop command must use the binary value zero not the ASCII character 0 followed by a data count which is also zero All multi byte parameters must be entered least significant byte first For example the Zloop command has a 16 bit...

Page 23: ... given rates by Fcy 12 where Fcy is the actual crystal frequency in MHz used for the CY545 The slope parameter for the Slope command determines how quickly the CY545 accelerates and decelerates while stepping It is also a single byte value and should range from 1 to 255 Slowest accelerations are selected by small values of slope while fast accelerations use larger values for slope In practice you ...

Page 24: ...and sets the current position kept by the CY545 to the value of its parameter This number is a 24 bit value so any position from 0 to 16777215 may be specified Normally this command is used after stepping to a known mechanical position such as a home position sensor and can calibrate the CY545 to make this position always be the same number While the CY545 is stepping the internal current position...

Page 25: ...n Recall that the current position is defined by the At command and is updated with every motion It is a 24 bit value ranging from 0 to 16777215 The Position command limits stepping to a number of steps within this range Position Counter Wrap around If a relative motion causes overflow or underflow of the current position register an absolute move would now work within the new block of 16 million ...

Page 26: ...2 cr Set User Selectable Bit 2 high B 2 cr Clear User Selectable Bit 2 low The same function may be performed by the bit parameter value When a character is detected it simply complements the fourth bit of the bit value parameter so the same functions as above can be specified by B 02H cr Set Bit 2 B 12H cr Clear Bit 2 The character is equivalent to performing an exclusive OR XOR of the bit number...

Page 27: ... bits 8 to F of the Bit command These special function lines can only be tested or changed on an individual basis NOTE Setting or clearing these Special Function bits when associated hardware is present could cause unwanted interactions between the CY545 and the hardware Also the CY545 will change the values on these signals as required for normal support of the hardware Be sure to manipulate only...

Page 28: ...mmand The TIL command may jump to itself The Wait command simply waits for a match of the bit s against the parameter value When there is no match the CY545 stays in the Wait command and continually tests the signals until a match occurs Once a match is detected the CY545 will continue with the next command If you issue a new command either in parallel or serial format while the CY545 is stuck in ...

Page 29: ... match This mechanism should always seek the same mechanical position since any directional backlash is compensated by using the same CW step direction in seeking the final home position If the CY545 runs into one of the limits while looking for the home signal it will abort the home command and stop stepping The current position is not changed to zero in this case Special Note Regarding Older Ver...

Page 30: ...mands into Memory The two commands that control the entry of data into memory are E Enter following commands to memory Q Quit entering commands to memory The Enter command is issued to the CY545 in the direct command mode Once this command is executed the CY545 changes to the program entry mode All following commands will be written to the external memory The CY545 will not execute any of the comm...

Page 31: ... external memory at the current address in the address pointer The X command would normally be preceded by a Y command to set the program starting address In the program execution mode the CY545 will begin reading command characters from the memory incrementing the address pointer after every read operation When an entire command has been read into the part that command is executed similarly to di...

Page 32: ...emory The ability to issue direct commands while the CY545 is running an external memory program provides a degree of live interaction allowing you to change parameters or modify the execution flow by the direct commands It is even possible to halt a program by issuing the Zero command Note A special feature of the CY545 is the ability to automatically run an external program at power up or whenev...

Page 33: ...ent directions When the Stop command is seen the CY545 goes back to direct command mode and waits for the next command The program could be repeated by sending the Y and X commands again since the program continues to reside in the external memory If non volatile external memory is used such as an EEPROM the program will be stored in the memory even when power is removed from the CY545 system So o...

Page 34: ...undary the address pointer is incremented before the command is executed so the branch would be taken into the new page of the memory not the previous page that started the command The Jump command simply provides a short version of the branch function It can reach any address on the current memory page The Loop command provides a repeated branch with a specified number of iterations Both paramete...

Page 35: ...ogram Branch Commands 30 Recall that the CY545 also supports a branch command using the bit instructions the Til command It tests the I O signals against the specified bit parameter value and jumps if the values do not match Otherwise execution continues with the instruction after the Til command ...

Page 36: ...at power up This selects the ASCII command mode with The most significant bit selects between ASCII command mode and Binary command mode When the bit is set ASCII mode is selected and when the bit is clear Binary mode is selected When you use Binary command mode you must first issue an O command in ASCII mode that turns off the upper bit to put the CY545 into Binary mode All commands following the...

Page 37: ... a CY233 Network controller When MB2 is one the special HP LED display is selected In this case all output from the CY545 goes to the local HP LED display and a special signal HP_SEL shared function with USRB7 is generated while the CY545 is writing to the display More information about support for this display is provided in a later section When a Mode command is issued with MB5 set to one the CY...

Page 38: ...s always enabled so the host computer is not required to reconfigure itself first sending commands without CTS monitoring then switching to CTS monitoring When the CY545 is reset both the CTS signal USRB6 and the second User Bit signal say USRB5 are high This forces the CTS output from the AND gate to be low which is the active state The host computer can now send the Mode command to enable the CY...

Page 39: ... crystal frequencies above 11 MHz the CY545 can adapt successfully to baud rates of 4800 baud or less with a small enough error to insure reliable operation of the serial interface However at 14 7456 MHz the CY545 can adapt to all baud rates up to 19 200 plus two non standard rates of 38 400 and 76 800 baud The CY545 will set the baud rate during the execution of the Mode command and the new rate ...

Page 40: ...ays be changed back to the defaults when a reset is performed or an I command is executed Time Delay Command The CY545 also provides a time delay function with D Del16 Delay for specified milliseconds The parameter for the Delay command is a 16 bit value calibrated in milliseconds when running at 12 MHz This command simply causes the CY545 to wait for the specified time before going to the next co...

Page 41: ...fied parameter value The Cmd portion of the Query command is a single letter selecting the parameter for display Possible choices are N Number of Steps value P Current position value R Current final rate value F Current first rate value S Current slope value Y Current memory address pointer value B Current user bits input value When the Query command is received or read from memory the CY545 displ...

Page 42: ...ver the serial interface with the CY545 displaying the result on a local HP display Each query command will output the current value of the requested parameter For the user bits query a 16 bit value is returned with the lower 8 bits corresponding to the CY545 User Bits and the upper 8 bits corresponding the the CY545 Data bus Display Memory Contents One more parameter may be issued for the Query c...

Page 43: ... like ASCII mode for the duration of the string Embedded Control Characteristics and Their Use The string command allows any 8 bit characters except to be transmitted as part of the string This will allow embedded control codes and special setup commands to be issued to peripheral devices such as the CY325 LCD windows controller For example the string Ctrl C V 0D6h cr Ctrl D Hello cr puts the CY32...

Page 44: ...or the control register If address 30H is followed by a zero data count the CY545 default control value will be selected Otherwise the value of D1 will become the new control register value and can be used to change the display intensity or turn on the blinking feature For more information about the HP display and CY545 support see a later section on Display Support and the HDSP 211x data sheets a...

Page 45: ...al CY545 design The second example is similar but uses the parallel input bus to send commands to the CY545 with the pulse and direction lines still sent to a power driver The third diagram illustrates a full blown system with RS 232 serial input external memory display circuits thumbwheel interface and I O lines and is implemented on the CYB 545 prototyping board CY545 Example Circuit Minimum Ser...

Page 46: ...CY545 Stepper System Controller www ControlChips com 2002 Cybernetic Micro Systems Chapter 11 CY545 Example Circuits 41 CY545 Example Circuit Minimum Parallel Configuration ...

Page 47: ...CY545 Stepper System Controller www ControlChips com 2002 Cybernetic Micro Systems Chapter 11 CY545 Example Circuits 42 CY545 Example Circuit Maximum Configuration ...

Page 48: ...ly if a 5 volt only version is used but the memory contents are not lost when power is removed An applications schematic provided with this manual illustrates the use of an EEPROM as the external data memory for the CY545 The device shown is a Xicor X28256 EEPROM which has 32K bytes of memory Smaller devices may be used if less memory is required and a larger device with a full 64K bytes of memory...

Page 49: ...h at least one bit of data is inverted while the memory is busy writing the byte When a read is performed the data read does not match the data written until the write operation is complete This change in data values indicates when the memory is ready for the next operation The CY545 performs the verify Read repeatedly until the data matches the value written or a time out occurs For RAMs the matc...

Page 50: ...andard CY545 commands follow now F 15 cr additional start up commands Q cr End of memory content definition When the CY545 is now reset it will execute the memory based commands starting with the R125 cr command since the key sequence was found in the first three locations As a special convenience you may command the CY545 to ignore the auto start command sequence by holding the XMEM_SEL signal lo...

Page 51: ...xternal memory support of the CY545 could be used to hold several programs one for each of the desired lengths needed by the application Some mechanical selection process could then choose which program the CY545 would run based on the desired length This approach is also practical so long as you can define all the required lengths within the memory contents If a new length is desired a program fo...

Page 52: ...racters of the command stay intact including the space after the command letter comma or space between arguments and carriage return at the end of the command When these commands are written to external memory the character is included in the memory contents Recall that the external memory contents are identical to the characters sent in the direct command mode The CY545 will act on the character ...

Page 53: ...be an example of this For 3 digit parameters one 74LS156 can be used to address two different parameters Each half of the 74LS156 can select 3 digits with one line not used The Rate and First rate parameters illustrate this example To allow every parameter to be specified by a thumbwheel switch selection would require three 74LS138s plus one or one half 74LS156 per parameter It also would take one...

Page 54: ...digits 4AH 48H H command bit number 3 digits 52H 50H T command bit number 3 digits 62H 60H W command bit number 3 digits 6AH 68H J command byte address 3 digits 72H 70H L command repeat count 3 digits 7CH 78H Z command repeat count 5 digits Group 3 C2H C0H O command mode value 3 digits CAH C8H command query letter code 3 digits Each parameter has been assigned a potential range of 8 addresses to m...

Page 55: ...CY545 Stepper System Controller www ControlChips com 2002 Cybernetic Micro Systems Chapter 13 Thumbwheel Switch Support 50 CY545 Thumbwheel Circuit Diagram ...

Page 56: ...X is the parameter letter N P R etc and vvvvv is the five decimal digit or eight decimal digit value of the parameter The query output ends with a single carriage return character Output to LCD CY325 Based When the CY325 based serial display is selected the CY545 commands the CY325 to split the display into two sections The right hand section is used for string outputs and no modifications are mad...

Page 57: ...Example shown in a previous chapter Output to 8 Digit LED Display The final selection for a display device is a special parallel display using the Hewlett Packard HDSP 211x displays These displays are very compact LED based 8 character dot matrix displays They have programmable intensity and custom definable character fonts The displays connect to the CY545 over the parallel data bus the lower add...

Page 58: ... Systems Chapter 14 CY545 Output Display Support 53 The CY545 takes care of any timing involved in running the HP display and generates the proper control signals Also a special command allows you to customize the display control for your desired intensity or other functions ...

Page 59: ...memory are addressable at the memory socket which can accept PROM EPROM or EEPROM It is possible for such a system to operate without the use of a host computer The CY545 with local memory can contain the routines required to run the system while the display provides the mechanism for system control by the operator A Wirewrap area is provided for implementation of thumbwheel switches driver circui...

Page 60: ...le Software This Win98 NT based software Provides Com Port Communication for Cybernetic Micro Systems Controller Chips and Prototyping Boards The program allows keyboard entry to one of Com 1 2 3 or 4 The user has control over many of the Com port settings including Baud data length parity stopbits and CTS RTS Typing is buffered at the keyboard until the Enter key sends the entire string to the se...

Page 61: ...33 and the parallel CY545 interface With this second option it is possible to control multiple CY545s through one host serial port as a network of motor controllers The CY233 acts as the network communications controller recognizing commands meant for the local CY545 while the CY545 runs the stepper motor as commanded by the host The CYB 233 board also contains a wire wrap area to which you may ad...

Page 62: ...cters The board contains a socket that will accept the CY545 and allows it to communicate serially with the CY325 Also included are an RS 232 interface and RJ 11 jacks for serial connection to the board A wire wrap area makes it possible to add the motor driver interface the local external memory and thumbwheel switch interface for the CY545 The combination of the CYB 003 board with the CY545 CY32...

Page 63: ...eep the data signals and IO_REQUEST stable until the CY545 responds by driving BUSY low Note the response time is normally around 25 microseconds usec so the CY545 is slower than an I O peripheral or memory device and some systems may require a latch on the data bus signals Once the BUSY signal has gone low the IO_REQUEST signal should be driven high again and the data signals may be removed A typ...

Page 64: ...back high again When there are multiple bytes to send the FPL signal will be brought low as the CY545 is ready to generate the next data byte value This behavior is compatible with the CY233 LINC device generating one message for query responses in the ASCII mode and one message per data byte in the Binary mode A typical query response waveform is shown below Immediate Commands During External Mem...

Page 65: ...rce in CY545B designs In order to allow immediate commands to be issued at any time even while the CY545B is reading data from the local memory we must implement a new handshake protocol for the immediate commands which prevents corruption of data on the data bus In the CY545B this is done without using any more signals so no other User Bits are given up to perform this more complex handshake Inst...

Page 66: ...low before Busy goes low In this case the CY545B has decided due to a command from the memory to output a message to the host rather than accept the immediate command input This is shown in the first example waveform below The CY545B is driving the data bus when FPL is low The host must accept the output message from the CY545B before continuing with the immediate command in this case The state of...

Page 67: ...5 of the mode register to one using the Mode O command The CY545B will drive CTS high off if enabled during the execution of any memory command then drive it low again as the next memory command is being read If the host uses the CTS signal to indicate when it is safe to send a command letter the CY545B will accept the letter and save it in the serial buffer until the current memory based command ...

Page 68: ... has been enabled this signal will indicate that no more data should be sent Otherwise the host must perform a time delay allowing the CY545 to execute the current command before sending more command characters When a query command is received and the CY545 mode register is set to respond out the serial port Mode bit MB0 0 the query response will be sent on the TxD signal after the command is rece...

Page 69: ...ry access waveform is shown below As a special feature the CY545 performs a verify read after writing to the memory This function is provided in support of EEPROM memories that require a long time to perform a write operation and cannot perform another random write or read while the first one is in progress Many of these memories support Data polling in which at least one bit of data is inverted w...

Page 70: ...erface along with external memory Since both functions share the CY545 data bus the parallel command source must be able to release the data bus when the CY545 is commanded to access the external memory The host system should only drive the data lines when the CY545 is not busy and the host must stay off the bus while the CY545 is executing commands from the memory No special signals are provided ...

Page 71: ...nerated on the data bus This value is latched into the 74LS373 using the ALE signal Then the actual data transfer occurs For a write the CY545 generates the write data on the data bus along with a write strobe WR For a read the data bus is floated and a read strobe is generated using RD so the memory can now drive the bus When the data transfer is over the HP_SEL signal goes high again disabling t...

Page 72: ...or the motor are PULSE and CCW which provide the step and direction indications to the motor These signals are connected to the external power driver that actually runs the motor Every time the CY545 directs the motor to take a step a signal is generated on the PULSE line The power driver should advance the motor by one increment for each pulse Note that the step increment could be a full step hal...

Page 73: ... if possible Several PULSE signal waveforms are shown below for different step rates Notice that the PULSE signal is normally high and goes low at the beginning of a step It stays low for a fixed amount of time which depends on the crystal frequency of the CY545 and then goes back high for the duration of the step time When it is time for the next step PULSE goes low again When the step rate param...

Page 74: ...ection while stepping and a parking power selection while stopped This can provide maximum torque during motions and provide holding torque while the motor is not moving in order to prevent overheating of the motor The CY545 automatically delays for 5 milliseconds after the last step before bringing the STOPPED signal high again This allows the motor to settle into its final position before the hi...

Page 75: ...the SLEW signal must be driven low before the motion starts INHIBIT_ABORT The INHIBIT_ABORT signal is a stepping control input to the CY545 with a number of functions In general it is used to override the normal stepping behavior of the CY545 as selected by the CY545 commands If this signal is low at the beginning of a motion started by a Position or Go command that motion will not start until the...

Page 76: ...wn the motor and stop when the initial step rate is reached simply hold the INHIBIT_ABORT signal low until the CY545 brings the STOPPED signal high again Several cases are illustrated below CW_LIMIT and CCW_LIMIT The CY545 also provides two inputs for immediately stopping a motion the CW_LIMIT and CCW_LIMIT signals If the relevant signal goes low during a motion in that direction the CY545 immedia...

Page 77: ...gnal because it is checked for one of three different states and is both an input and an output When the line is left floating so the CY545 can drive it both ways the jog function is disabled and stepping only occurs when the CY545 is commanded to take a motion When the line is driven low the CY545 will jog the motor in the clockwise direction The CCW signal will change state if required to select...

Page 78: ...quire enough time to issue the 11 character position string at the baud rate defined for the serial interface The JOG signal also represents a minimal mechanism for testing the CY545 and motor subsystem Without any commands it is possible to move the motor in either direction verifying that the PULSE and CCW signals are correctly connected to the motor power driver and that the motor is properly c...

Page 79: ... changed to zero in this case As with the jog function the current position will be displayed after every step if bit 4 of the Mode Register is set Some care must be used in designing the home sensor signal for the CY545 to insure that it initially steps in the correct direction to seek the home signal If the application involves a circular positioning function in which the mechanism rotates a whe...

Page 80: ...ugh a motion by either the Go or Position commands stepping will start at the rate selected by the F parameter The rate will then increase regularly through the other rates in the table until the final rate selected by the R parameter is achieved The CY545 will then slew at this rate until it is time to decelerate back to the selected starting rate as the specified number of steps is taken If the ...

Page 81: ...imum performance for any motor driver load combination An example waveform is shown below Acceleration Curve as a Function of R Another feature of the CY545 acceleration algorithm is that the shape is fixed by the value of the Slope parameter S The acceleration curve is always the same for a given value of S The step rate parameters merely determine where the CY545 starts stepping and where it sto...

Page 82: ...een two adjacent rates in steps second the incremental slope also the ramp time is given by the acceleration and the dynamic range of step rates taken as t Rmax R0 Rmax R0 a s 3906 D 256 s The value used for D in the above formulas must be chosen with care since the distance between rate points changes as you move through the CY545 Step Rate Table D starts with a value of 25 then 50 then 35 and fi...

Page 83: ...CY545 Stepper System Controller www ControlChips com 2002 Cybernetic Micro Systems Chapter 17 CY545 Step Rate Information 78 CY545 Slope Curves ...

Page 84: ...CY545 Stepper System Controller www ControlChips com 2002 Cybernetic Micro Systems Chapter 17 CY545 Step Rate Information 79 ...

Page 85: ...CY545 Stepper System Controller www ControlChips com 2002 Cybernetic Micro Systems Chapter 17 CY545 Step Rate Information 80 ...

Page 86: ...CY545 Stepper System Controller www ControlChips com 2002 Cybernetic Micro Systems Chapter 17 CY545 Step Rate Information 81 CY545 Step Rate Table 11 MHz ...

Page 87: ...CY545 Stepper System Controller www ControlChips com 2002 Cybernetic Micro Systems Chapter 17 CY545 Step Rate Information 82 CY545 Step Rate Table 12 MHz ...

Page 88: ...CY545 Stepper System Controller www ControlChips com 2002 Cybernetic Micro Systems Chapter 17 CY545 Step Rate Information 83 CY545 Step Rate Table 14 75 MHz ...

Page 89: ...CY545 Stepper System Controller www ControlChips com 2002 Cybernetic Micro Systems Chapter 17 CY545 Step Rate Information 84 CY545 Step Rate Table 16 MHz ...

Page 90: ...resistors If the pins are left open the input signals will be high The data bus pins must have external pull up resistors to output a high value Where appropriate an input line will be considered in the floating state if the CY545 can drive it both high and low The data bus is bi directional and is tri state during nonactive modes Note that data bus signals are positive logic Reset Circuitry The R...

Page 91: ...g discussed in this manual assumes an 11 059 MHz series resonant crystal Note that 11 0 MHz such as a CTS Knights MP110 or equivalent will work fine The CY545 requires an 11 MHz clock in order to generate the standard baud rates although any crystal in the allowable range can be used with the adaptive mode within the timing resolution limits of the CY545 Use 7 3728 MHz to make the fastest possible...

Page 92: ...r program jumps The example program consists of several sections First the stepping performance parameters are set and the current position is cleared to zero This position could also be found by a Home command if the application requires a move to a known reference position Next the CY545 waits for a signal that indicates stock is available This is tested on User Bit 3 When stock is available the...

Page 93: ...ff punch 161 D 100 cr Wait for punch to clear work stock 167 G cr Move to next hole position 169 L 139 cr Repeat punches as set by external switches 177 D 250 cr Delay 250 msec let stock settle into place 183 B 1 cr Activate punch for last hole in piece 188 D 1000 cr Delay 1 sec to punch hole 195 B 1 cr Turn off punch 199 D 100 cr Wait for punch to clear work stock 205 N 200 cr 211 G cr Move 200 s...

Page 94: ...tor The user has two choices in the selection of driver circuits Existing designs usually in the form of pulse to step translators may be used or special designs may be created Translators usually require a pulse and direction input or two pulse streams one for CW stepping and one for CCW stepping The translator takes the pulse inputs and generates the proper four phase outputs for the motor Note ...

Page 95: ... require motors with six or eight leads since the power supply is connected to the middle of each winding The end of each winding is pulled to ground through a transistor controlled by one of the phase output lines from the data PROM Motor performance may be improved by adding a dropping resistor between the power supply output and the center tap of each winding This decreases the field decay time...

Page 96: ...enerally destroying the transistors in the process Protection logic is usually included to insure that one transistor is off before the other is allowed to turn on The most advanced driver designs are variations on the unipolar or bipolar types although they are generally implemented using the bipolar approach These drivers are capable of the highest step rates attainable They work by switching cu...

Page 97: ...des available from the various motor manufacturers and driver circuit designers for additional information Interfacing to the 8255 In the example shown in Figure 19 9 below the CY545 is operating in the parallel ASCII input mode In this mode bit 7 is always zero and b7 line of the CY545 data bus may be tied to ground Since the user will normally transfer bytes of data from memory to the output por...

Page 98: ...s IO_REQUEST line is inactive Synchronization of Two CY545s Two CY545s executing similar programs from external memory may be synchronized as shown in the figures The master CY545 can control a USERBIT line of the slave CY545 via the Bit command to set or clear a user bit The slave CY545 is started first with an Execute command and executes a Wait command and waits until the USERBIT line is driven...

Page 99: ...ers The geometry of the parts and the arms used to carry the parts requires that the hand off be carefully synchronized between the two controllers The one to receive the part waits at the receiving position until the CY545 which has the part signals that it has arrived The two arms then move together in a coordinated motion reaching a point at which the distance between them is a minimum The part...

Page 100: ...ut on the STOPPED output is also shown PRESET B 16 cr clear USER BIT O Line R 90 cr set RATE 90 S 200 cr set SLOPE 200 F 10 cr set FIRSTRATE 10 N 3 cr set NUMBER steps 3 Y 100 cr set memory address ENTER PROG E cr B 0 cr set USER BIT 0 PROGRAM CR set CW direction CODE G cr GO begin stepping B 16 cr clear output line cr set CCW direction G cr GO begin stepping T 1 100 cr repeat above prog Til USER ...

Page 101: ...s ASCII decimal values In the Binary command mode the equivalent sequence is 42 01 10 USER BIT 0 low 42 01 00 USER BIT 0 high 52 01 64 set Rate 100 53 01 F0 set Slope 240 46 01 0F set First Rate 15 4E 03 05 00 00 set Number of steps 5 47 00 take five steps All values are listed as their hexadecimal equivalents but are sent to the CY545 as single 8 bit data values Command letters have the same code...

Page 102: ...steps may be used with the Parallel Command Interface 5 Place the command on the data bus ASCII value 2Bh D0 1 D1 1 D2 0 D3 1 D4 0 D5 1 D6 0 D7 0 6 Lower the IO_REQUEST line pin 13 7 Wait for the BUSY line to go low before bringing IO_REQUEST high again BUSY is pin 15 8 When IO_REQUEST is brought back high BUSY will return high 9 Wait for BUSY to return high then place the carriage return code on ...

Page 103: ...ignal will return high when this command is sent If you have successful parallel or serial communications 17 If you reach this point successfully you are commanding the CY545 and should be able to enter any command and obtain the correct response 18 Suggested sequences a Try to toggle a User Bit signal using B 0 cr and B 16 cr for pin 21 Remember the single space between the command letter and par...

Page 104: ...rns to set the adaptive 160 rate then sending a Mode command to enable the Clear 170 To Send signal After this the program redefines the 180 computer serial port to function with the CTS signal 190 It then becomes a terminal emulator waiting for keyboard 200 input which it displays on the screen and sends to the 210 CY545A while displaying all serial characters received 220 from the CY545A 230 300...

Page 105: ... PRINT 1 A PRINT 2 A 700 710 720 Check for any received data from COM port and 730 display it with line feeds filtered out Loop back 740 to check keyboard again when no more received data 750 760 WHILE NOT EOF 1 770 J LOC 1 B INPUT J 1 LF 0 780 LF INSTR LF 1 B LF 790 IF LF 0 THEN MID B LF 1 NL GOTO 780 800 PRINT 2 B 810 WEND 820 GOTO 640 900 910 Exit program when Escape key is pressed 920 930 CLOS...

Page 106: ...he complement of a bit function The CY545A binary mode required the actual complementary numerical values for clearing the bits The CY545B changes the 5 millisecond time out at the end of a motion The time out value is now determined by the FirstRate paramenter Faster rates higher values will time out faster than slow rates This change affects repetitive single stepping where a single step N 1 com...

Page 107: ...CY545 Stepper System Controller www ControlChips com 2002 Cybernetic Micro Systems Chapter 20 Getting Your CY545 Running 102 Stepper Motor Controller Selection Guide ...

Reviews: