Home
ModIO User Manual
Contents
1. Pin Signal I O Description 1 Vss Power Supply GND 2 Vcc Power supply 5V 3 Vee LCD Bias voltage 4 RS O Register Select 5 R W Gnd Read Write Connected to Gnd 6 E O Display Enable 7 DBO N C Not Connected 8 DBI N C Not Connected 9 BD2 N C Not Connected 10 DB3 N C Not Connected 11 DB4 O T O Data Bus Line 6 12 DB5 O T O Data Bus Line 6 13 DB6 O T O Data Bus Line 6 14 DB7 O T O Data Bus Line 7 MSB 15 BL Back light Supply 5V 16 BL Back light Supply GND Table 6 5 J10 LCD Connector 6 3 1 3 Register Use Summary The registers used by the LCD interface are listed below in Table 6 6 Address Name Bit7 15 Bit614 Bit5 13 Bit6 12 Bit3 11 Bit2 10 Bit1 9 Bit0 8 101 lt 15 8 gt CONFIG 101 lt 7 0 gt CONFIG DBEL PDL2 PDL1 PDLO UPMP UDIS UANA ULCD 1000 lt 15 8 gt LCD CHAR 02 D7 D6 D5 D4 D3 D2 D1 DO 1000 lt 7 0 gt LCD CHAR 1 D7 D6 D5 D4 D3 D2 D1 DO 1039 lt 15 8 gt LCD CHAR 80 D7 D6 D5 D4 D3 D2 D1 DO 1039 lt 7 0 gt LCD CHAR 79 D7 D6 D5 D4 D3 D2 D1 DO Table 6 6 Registers associated with LCD Interface Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 6 3 2 1040 DOUT Discrete Output Register Each of the Discrete outputs may be controlled by the DOUT register The register contains a bit for each discret
2. R W 1 R W 1 R W 1 R W 1 R W 1 R W 1 R W 1 R W 1 FLD7 FLD6 FLD5 FLD4 FLD3 FLD2 FLD1 FLDO Bit 7 Bit 0 Bit 7 FLD7 Discrete 7 Flash Disable 1 Disable flashing output 0 Enable flashing output Bit 6 FLD6 Discrete 6 Flash Disable 1 Disable flashing output 0 Enable flashing output Bit 5 FLDS Discrete 5 Flash Disable 1 Disable flashing output 0 Enable flashing output Bit 4 FLD4 Discrete 4 Flash Disable 1 Disable flashing output 0 Enable flashing output Bit 3 FLD3 Discrete 3 Flash Disable 1 Disable flashing output 0 Enable flashing output Bit 2 FLD2 Discrete 2 Flash Disable 1 Disable flashing output 0 Enable flashing output Bit 1 FLD1 Discrete 1 Flash Disable 1 Disable flashing output 0 Enable flashing output Bit 0O FLDO Discrete 0 Flash Disable 1 Disable flashing output 0 Enable flashing output Note Flashing should not be enabled for output pins that are used for the DigiSpeed or scanned keyboard Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide Legend R Readable Bit W Writable Bit U Unimplemented T bit set 0 bit cleared X bit Unknown Copyright 2006 Homann Designs Revision 0 92 ModlIO M100 Modbus Interface Unit Users Guide 6 2 5 104 PUMP Pump Control Register The ModIO provides a Safety Charge Pump facility The purpose of this facility
3. 0 89 gt Device found v0 10 PIC18F452 COM1 57600 ax Look in E MachDownloads DI EI ex ES modiov16C hex My Recent Documents Desktop My Beanies gr My Computer w e W SCH Filename Open Places Files of type Jung Files D HES x Cancel E ll 8 gt HEX file imported v0 1 DOMI 57600 4 Figure 7 6 Hex file leaded and the Write device icon Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 8 Revision data Version Date Change record 0 92 16 April 2006 Various detailed drafting improvements made after user feedback 0 91 20 March 2006 Initial issue of full manual Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 9 Index Addressing Eet 18 ADDRHI 100 8180 39 AnalogIn 1152 3 4 registers eee 57 Bit COMDBOFF communications debug GEI TEE 46 LEI EE A0 DBENHI debug enable disable 46 DSDBOFF DigiSpeed debug enable disable visicsadissscsnsdsetastcesssessecess 46 DSOFF DigiSpeed enable disable 47 KBOFF keyboard enable disable 47 LEF limit error flashing control 41 MPGDBOFF MPG debug enable disable 8 46 PEROFF period measurement enable disable ossee 47 UANA Enable Disable analog I O TINGE ACCS E E 40 UCG character gap 41 UDIS Enable Dis
4. Ess Figure 2 5 Mach3 set for ModIO It is assumed that you are plugged into COM1 on your PC The baud rate and async parameters are set to 57600 and 8 1 N which is the ModIO default Use RTS is only relevant Copyright 2006 Homann Designs to half duplex RS Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 485 operation and the default serial timeout of 50mS is suitable for all applications At this stage the green LED to the left of the RS 232 cable should be giving and intermittent double flash about every half second This shows that data is being received by the ModIO eine Option The details of the Autopoller are described later in Slave Addr Start Reg Registers chapter 4 For now notice only that the Slave Address uso ER CG Inpi is set to 1 in Mach3 whereas the ModIO default is 6 Change the screen as shown in figure 2 6 and click m fo fo o Apply Output When you do this you should notice that the status v ei D message Receive Timeout at the top of the screen In Io Ge Hok should change to No Error The flashing green LED will speed up and the red one above it will also flash Update Frequency Ia Hz The red LED shows that the ModIO is recognising the received data because the slave address is correct Figure 2 6 Setting slave address and transmitting replies There is no point in going further if you cannot get t
5. hey Session Profle x Current Profiles Figure 2 2 Creating new Profile Create Profile E x Clone From 6 Name Ey Pe PARI me ModIOTest J Default Profile Values 777 PCNC M3 Beta RelMach3Turn Do not put any extension vMaxModIO on the new profile ca Figure 2 3 Naming and cloning ModlIO M100 Modbus Interface Unit Users Guide Open the dialog from the Config gt Setup ModBus Control menu It will look like figure 2 4 ModBus Status amp Control i a Comm Port Receive Timeout X Test ModBus Port Num 1 Status _Test Modbus BaudRate 19200 e n zl I use rts for transmit R5485 Timeout 50 ms m AutoPolling Option Input On Slave Addr Start Reg Registers Vv 1 2008 4 Input Holding Coils Discrete Mapped to Inputs pin 0 3 1 1024 50 Input fe Holding Cosi Discrete Mapped to Inputs pin 64 127 Output 1 3072 64 C Holding Coils Mapped to outputs 0 63 1 641 50 Holding Coils Mapped to outputs 64 127 Update Frequency 120 Hz Special Control Apply I Use each input word as 16 bits of Bitmapped Input instead of mapped inpuMax of 64 bits IT Map outputs 1 64as 6 bits of Bitpacked output IV MPG 1 instead of mapped outpuMax of 64 bits Auto Bitpacking in effect I mpc 2 WM OEM Control code incomng on Register 64 in MODIO mode of the mappe
6. ModlIO M100 Modbus Interface Unit Users Guide Page 1 Updated 16 April 2006 ModiO M100 Modbus Interface Unit User s Guide ModlO PCB Rev 1 2 aka Rev C Firmware Rev 16 Mach3 Rev 1 84 Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide Homann Designs 20 View St HIGHETT VIC 3190 AUSTRALIA info homanndesigns com http www homanndesigns com Copyright 2005 6 Homann Designs All rights reserved No part of this publication may be reproduced transmitted transcribed stored in a retrieval system or translated into any language or computer language in any form or by any means electronic mechanical magnetic optical chemical manual or otherwise without the prior written permission of Homann Designs Disclaimer Homann Designs makes no representation or warranties with respect to the contents hereof and specifically disclaim any implied warranties or merchantability or fitness for any particular purpose Information in this publication is subject to change without notice and does not represent a commitment on the part of Homann Designs Feedback We appreciate any feedback you may have for improvements on this document Please send your comments to info homanndesigns com Trademarks ModIO and DigiSpeed are trademarks of Homann Designs All other brand and product names mentioned herein are trademarks services marks registered trademarks o
7. DOUTO Table 6 7 Registers associated with Discrete Outputs Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 6 4 1041 SSPEED PWM for DigiSpeed unit The ModIO will generate a pulse width modulated output which is presented on the DigiSpeed interface header J5 Pin 2 and on DOut4 The interface is enabled by bit 7 of CONFIG2 0 When the interface is enabled DOut3 and DOut4 are dedicated to the PWM function and cannot be used as Discrete outputs The frequency of this pulse train is 4 75Hz The pulse width is controlled by the least significant 10 bits of register 1041 SSPEED A value of 0 in this register is 0 of the pulse time being active hi on 15 pin 2 lo on DOut4 A value of 1024 is 100 of the pulse time active DOut3 is used as the Enable signal for the PWM output and optionally the DigiSpeed itself Its configuration is optimized for this application The software in the master e g Mach3 should use bit 3 in the DOUT register to turn the PWM signal on and off DOUT3 1 forces the PWM signal to be 0 active zero speed DOUT3 0 generates the pulse width defined by SSPEED In addition DOut3 can be connected to the DigiSpeed as an enable via J5 pin 3 or the DigiSpeed enable can be help permanently lo active by J P 13 DOut2 is presented to the DigiSpeed on 15 pin 4 It can be used to control a contactor to set the direction of spindle rotation In this case it
8. T O functionality to your CNC system The M100 provides the following e Serial Communications e DigiSpeed Interface e Modbus Protocol Stack e Generates PWM Signals for e RS 232 Transceiver and DigiSpeed Motor Speed controller e RS 485 Half or Full Duplex Interface e Expansion Module Interface e RX and TX communications activity e Provides for up to 15 Special purpose indicator LEDs Interface expansion boards e Digital I O e Power Supply Input e 8 Digital 0 5 volt logic inputs e 8 to 24 Vdc or 6 to 12Vac via e 8 Digital outputs capable of driving screw terminals or relay coils e 8 to 24 Vdc or 6 to 12Vac via e LED Activity indicators on all inputs 2 1mm Coaxial jack and outputs e Power indicator LED e Analog Inputs e Firmware Upgrades e 3 Analog inputs with 0 5 volt input e User upgradeable via serial e 10 bit resolution 1024 steps interface e Quadrature Encoders e Other Features e 2 Manual Pulse Generator MPG e Error indicator LED for ModIO and Quadrature Encoder interfaces communications errors e Character LCD Interface e 5mm pluggable screw terminals for e For Hitachi HD44780 industry Digital Analog I O and Power standard controller character displays connections e Upto 4x 20 character LCD Display e Designed to fit into the OKW e Safety Charge Pump B6504111 RailTec DIN Rail e Disables outputs when Modbus enclosure Communications are interrupted The ModIO can be used with any controlling software sup
9. 3 Selecting baud rate Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 7 2 Connecting to the ModlO and erasing flash Click the Connect icon on the tool bar See figure 7 3 The bootloader should identify the PIC in the ModIO and enable the other icons on the toolbar Click the Erase Flash icon to erase the ModIO memory The PIC flash memory will be cleared This is most important or GR 0 d Device found wl 10 PIC18 2 COM1 57600 4 Figure 7 4 PIC identified and the Erase icon the subsequent re program will fail to give a valid system 7 3 Programming Next use the File gt Open menu item of open file icon to display a file open dialog Navigate to the folder where you have stored the firmware hex file probably downloaded from the ModIO Yahoo Group An example with only one file is shown in figure 7 5 Select the file to use and click Open Then click the Write device icon on the programmer utility This is highlighted in figure 7 6 The programmer will count up the bytes as they are written to the ModIO PIC When the write is completed remove the Boot jumper and Reset the ModIO If you have an LCD you can confirm the version of the current firmware that has been flashed as it is displayed on the initial screen Copyright 2006 Homann Designs E ll x AN PIC18F PIC16F Quick Programmer SH
10. 5 Unimplemented Bit 4 Unimplemented Bit 3 Unimplemented Bit 2 DSDBOFF DigiSpeed Debug Screen Control Enable Disable the ModIO DigiSpeed debug screen 1 Disable the DigiSpeed Debug screen 0 Enable the DigiSpeed Debug Screen Bit 1 COMDBOFF Communications Debug Screen control Enable Disable the ModIO Communications debug screen 1 Disable the Communications Debug screen 0 Enable the Communications Debug Screen Bit 0 MPGDBOFF MPG Debug Screen control Enable Disable the ModIO MPG debug screen 1 Disable the MPG Debug screen 0 Enable the MPG Debug Screen Note You should not normally enable the Debug interface except to investigate a particular problem as in this state the Discrete outputs a disabled for safety reasons Legend R Readable Bit W Writable Bit U Unimplemented I bit set 0 bit cleared A bit Unknown Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 6 2 7 106 CONFIG2 Configuration control register 2 R W 1 R W 1 R W 1 U 1 R W 1 R W 1 R W 1 R W 1 DSOFF PEROFF KBOFF UHSE2 UHSEI UENC2 UENCI Bit 7 Bit 0 Bit 7 DSOFF DigiSpeed Enable Enable Disable the ModIO DigiSpeed interface 1 Disable the DigiSpeed Interface 0 Enable the DigiSpeed Interface Bit 6 PEROFF Period Measurement Enable Enable Disable the ModIO Period Measurement Frequency interfa
11. 6 Baud Rate J57600 Test Slave Addr k Start oz a pel 3 fe A Access C Input Reaister s Read Holding Register s C Decimal C Coils 7 Discrete Inputs C wie J Report Slave ID i Figure 4 6 Writing test data Notes If you use this feature to change the ModIO configuration do not forget to Reset the ModIO so the new configuration is used Do not press Enter after typing data into the controls of the test dialog If you do so it will close as Enter is the shortcut for the OK button Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 5 interfacing some typical devices to ModlO This section describes some possible circuits for interfacing external devices It does not cover the standard interfaces for the DigiSpeed RS 232 RS 485 etc 5 1 Output devices It is very important to consider the options for the VOut supply for external devices All the outputs on 11 share a common VOut so a single choice must be made 5 1 1 External LED or lamp Gnd Generally with external lamps you will Supply need a separate VOut power supply In for VOut 5 to 24 volt DC this case you must remove the JP3 jumper to avoid the external supply back feeding VOut VGnd J1 9 S M od l 0 RS 232 link to PC or other outputs With this external power supply JP3 must AC DC power be removed Gnd Figure 5 1 Interfaci
12. B9 B8 1155 lt 7 0 gt MPG2 B7 B6 B5 B4 B3 B2 B1 BO 1156 lt 15 8 gt TickCtr B15 B14 B13 B12 B11 B10 B9 B8 1156 lt 7 0 gt TickCtr B7 B6 B5 B4 B3 B2 B1 BO Table 6 12 Registers associated with MPG Interface Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 6 4 5 1156 TickCtr Timing register This register gives the time in PIC ticks since an MPG register was read It is used to estimate the speed of rotation of the MPGs Address Name Bit7 15 Bit614 Bit5 13 Bit6 12 Bit3 11 0 Bit1 9 Bit0 8 1056 lt 15 8 gt TickCtr D7 D6 D5 D4 D3 D2 D1 DO 1056 lt 7 0 gt TickCtr D7 D6 D5 D4 D3 D2 D1 DO Table 6 13 Registers associated with MPG speed measurement 6 4 6 1157 Period Spindle speed measurement register Gives the time in a unit to be determined between the latest and penultimate pulses on the Index input of the DigiSpeed interface Address Name Bit7 15 Bit614 Bit5 13 Bit6 12 Bit3 11 0 Bit1 9 Bit0 8 1057 lt 15 8 gt Period D7 D6 D5 D4 D3 D2 D1 DO 1057 lt 7 0 gt Period D7 D6 D5 D4 D3 D2 D1 DO Table 6 14 Register associated with Period measurement Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 6 4 7 1158 Keyboard Scanned inputs register DOut pins 3 0 11 termi
13. Guide E 7 you OV E 7 EE 8 20 Lighting an LED 8 10 GE WEE 12 BT E 13 e es 51 0 GR ener Onn es es e Ur Rr ne eet Merete weve tern eit Rr e sreeSer aren 13 TEN EEE A ONES TEENE ONTE EEVEE V rA Koni 13 3 2 ee 13 32 Connector BUI E 13 TMO Connectors J1 IO 13 3 3 2 Te 16 21 SD ER E et 16 cocoa se rete ceerdttnereviet eerie R E easing cae 17 3 6 Configurations and Slave address swmtch 17 3 7 EE 17 Stal Kg MER 18 Status LEDS ieena ccs chee ares daca seus pengeteet ab aad eanen tinea Ea E abe se estensdtnataece 19 Bagger 19 3 81 Error LED nerne Eana AE A RARA AE 19 2 022 Transmit Recerv LEDS EE 19 3 8 3 SGA Pim Status ETA 19 Modbus Communication 0 dEgEdeededetete 20 3 9 SE WEE 20 20 RS 232 3 92 RS 485 MtEerfacE esoepta i Sa Aa EEEa E EE I TE EE ee S EE 20 3993 Discrete IMPUS ree a rere erro are oer een rer eer ee 21 310 Di crete KEES eher tend an eebe eet ube ow bias aaa echo ete emis 22 311 Exp nsion Mod le Interfaces 23 3 12 DigiSpeed DC Motor Controller 23 3 13 4 ModlO support in aes 24 4 1 Introduction to data the autopoller and macropump sssesesessssssseesereressssssesrreesssssses 24 4 2 Configuring Mach communications for a Modi 24 4 3 Enabling the ModIO Knei senge eelere hand dns sdavenemadedaues 23 4 Configuring ere 27 4 5 Configu
14. Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide input gates or indicator LEDs may be damaged 5 2 3 MPGs The diagram shows the MPGs being interfaced to the 5 volt supply ModIO for MPG Gnd Ideally you should use MPGs with Open Collector outputs as this avoids the need to co ordinate power supply voltages If you use totem pole outputs then the Vcc of the MPG must be the same as that of the ModIO Many MPGs require more current than can be provided by the ModIO and in this case RS 232 link to PC ModlO AC DC power IN Gnd MPG1 an external supply should be Figure 5 6 Interfacing MPGs provided as with MPG2 in this example 5 2 4 Rotary potentiometers See Analog input schematic diagram for details of a rotary potentiometer connection 5 2 5 Rotary switches as potentiometer Analog inputs are a very economical way of interfacing controls like axis selectors step size programming and such like using a rotary switch Macro code is of course 5 volt J1 1 J1 2 ModlO RS 232 link to PC needed to convert or 3 or 5 the voltage levels Kee 5 s AC DC power IN into actions in J1 6 Ground Gnd Mach3 Figure 5 7 Rotary switch as a potentiometer Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 6 Register Organization This chapter is aimed at a user who is going to
15. UART Parity Stop control bits 00 8 data bits 1 stop bit odd parity 01 8 data bits 1 stop bit even parity 10 8 data bits 2 stop bit no parity 11 8 data bits 1 stop bit no parity LEF Limit Error Flash control bit Limits the time that the error led will flash on detection of an error 1 Reset the error led after a few seconds 0 Latch the error led once an error is detected Unimplemented UCG Use Character Gap control bit Check when receiving a message that the gap between the received characters is less than 1 5 character reception time as per the Modbus specification 1 Check that the inter character gap is within limits 0 Ignore the inter character timing requirements Legend R Readable Bit W Writable Bit U Unimplemented T bit set 0 bit cleared A bit Unknown Copyright 2006 Homann Designs Revision 0 92 ModlIO M100 Modbus Interface Unit Users Guide 6 2 4 103 FLASH Flash control register The ModIO provides a Discrete Output Flashing Capability This facility can be enabled on an individual discrete output basis Output flashing is provided as a mechanism to easily allow the flashing of indicators such as warning lights etc Enabling disabling of individual discrete output flashing is controlled by the FLASH configuration register as defined below When a bit is cleared the corresponding Discrete output will flash if the Output is Active
16. baud rate slave address etc Plug in the power jack Turn on the computer and ModIO power supply The green power LED on the ModIO should light See figure 3 4 The LCD should display text similar to figure 3 3 in particular be sure to check that DEF is shown on the bottom line If it is not then the hex switch is not correctly set Copyright 2006 Homann Designs Revision 0 92 Next you need to tell Mach3 about your ModIO See Vea way reerereeree Ses esrrrrrrs ee ee E nent Double click the Mach3 icon not Mach3Mill Click Create Profile And fill in the new name and highlight that you want it cloned from Mach3Mill If you have another profile you normally use then you can clone from this See figures 2 2 and 2 3 You can either create a new shortcut for your profile see Using Mach3Mill manual or run Mach3 exe and select from the list of profiles In this manual we will assume that you are using the standard 1024 set screens The ModIO will however work with any screen set If you are testing the ModIO on a computer that does not have your machine tool connected to it then you will need to work in the Offline mode to be able to clear the EStop condition On Config gt Ports and Pins Port Setup amp Axis Selection tab check ModBus Input Output support Close Mach3 and reload it with your ModIOTest profile ry Ok j 1 py oc ED N a ku LA IR manges
17. output control Bit 3 CPE3 Discrete 3 Pump Enable 1 Enable Pump output control 0 Disable Pump output control Bit 2 CPE2 Discrete 2 Pump Enable 1 Enable Pump output control 0 Disable Pump output control Bit 1 CPE1 Discrete 1 Pump Enable 1 Enable Pump output control 0 Disable Pump output control Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide Bit O CPEO Discrete 0 Pump Enable 1 Enable Pump output control 0 Disable Pump output control Register Use Summary 101 lt 15 8 gt CONFIG 5 S 101 lt 7 0 gt CONFIG DBEL PDL2 PDLI PDLO UPMP UDIS UANA ULCD 104 lt 15 8 gt PUMP z 4 104 lt 7 0 gt PUMP CPE7 CPE6 CPES CPE4 CPE3 CPE2 CRP CPEO Table 6 4 Registers associated with Safety Charge Pump Legend R Readable Bit W Writable Bit U Unimplemented T bit set 0 bit cleared A bit Unknown Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 6 2 6 105 DEBUG ModlIO Debug control register R W 1 U 1 U 1 U 1 U 1 U 1 R W 1 R W 1 DBENHI COMDBOFF MPGDBOFF Bit 7 Bit 0 Bit 7 DBENHI Debug Enable High bit Enable Disable the ModIO Debug interface 1 Enable the Debug Interface 0 Disable the Debug Interface Bit 6 Unimplemented Bit
18. program a master to drive the ModIO or a user who is going to use the Test dialog in Mach or MachlIV to diagnose problems in a complex installation It assumes that you have an understanding of binary and hexadecimal numbers as a way of representing bit patterns Skip the chapter unless you have to use it There are three Register blocks in the ModIO These Register blocks are ROM REGISTERS e CONFIG REGISTERS e RAM REGISTERS The three blocks are separate and have different functionality All ModIO Registers are 16 bits wide The bits within a register are organized as Little Endian That is bit 0 is the least significant bit LSB bit 15 the Most significant MSB This is depicted below Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Table 6 1 Register Bit Layout Register addresses are also 16 bit in length Valid Addresses are from 0 to 65535 This is consistent with the Modbus specification Note Although the valid register address range is from 0 65535 the actual valid register addresses for the ModIO are dependant on the ModIO firmware you have loaded The ModIO memory may also be accessed as single bit s via the Modbus Discrete input 02 and coil functions 01 05 15 The Address for a bit in a 16 bit register may be calculated by Bit Address Register Address 16 bit numb
19. would be controlled as a discrete output by Mach3 Address Name Bit7 15 614 Bit5 13 Bit6 12 Bit3 11 Bit2 10 Bit1 9 Bit0 8 105 lt 15 8 gt CONFIG2 105 gt 7 0 lt CONFIG2 DSOFF PEROFF KBOFF UHSE2 UENC2 UENC1 1040 lt 15 8 gt DOUT 1040 lt 7 0 gt DOUT DOUT DOUT6 DOUTS DOUT4 DOUT3 DOUT2 DOUT1 DOUTO 1041 lt 15 8 gt SSPEED B9 B8 1141 lt 7 0 gt SSPEED B7 B6 B5 B4 B3 B2 B1 BO Table 6 8 PWM output register Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 6 4 1 1050 Encoder1 MPG Encoder read register 6 4 1 1 Overview The ModIO provides an interface for two MPG Manual Pulse Generator inputs The interface is provided primarily for 100 ppr pulses per revolution encoders as found on CNC pendants and controllers Note The MPG interface is not designed for high resolution encoders as found on servos etc The MPG interface may lose steps if the encoder generates more than 1000 pulses second The MPG interface is enabled by default but may be controlled via configuration register CONFIG2 Each MPG may be enabled disabled independently Additionally the encoder count for each encoder may be divided by four if desired Each encoder interface generates a 16 bit up down counter which rolls under over once the 16 bits have bee
20. 00mA per output Output amp uses a FMMT491 transistor rated at 200mA Vin 800 24Vde E h h J3 ach output is provided with a LED indicating when the VCC 560 output is active Note that the ModIO power supply is only capable of supplying 500 mA in total Therefore for high current applications VOut needs to be powered from an external power supply 2 3 J1 P8 13 8 VOut 5Vdc 24 00 J1 09 12 7 7 Dout x ModlO Microcontroller ULN2003 There are three sources for supplying power to the Discrete outputs The source is controlled by Jumper J3 as detailed below LI vGnd Logic Gnds External driver eg J1 P6 J10 5 star point Figure 3 6 Discrete Output Schematic 1 External supply to VOut Terminal Remove J3 completely By removing J3 the VOut terminal is isolated from the rest of the ModIO power supply Power for the devices connected to VOut must be provided externally and is to be connected between a VGnd terminal and the VOut Terminal 2 VIn Supply By placing Jumper J3 between pins 2 and 3 Power for VOut is sourced from the VIn power supply It is tapped into the supply after Vin has been full wave rectified but before it is regulated In this case power can be taken from the VOut terminals but an external supply must not be connected to it 3 5V Supply By placing Jumper J3 between Pins 1 and 2 power for VOUT is sourced from the ModIO internal vol
21. 49 Interfacing encoders and MPGs oseere 35 34 LED Ot a esisi 33 logic gate 34 7 34 potentiometer deeg 35 Eegeregie ere 33 rotary SWItCh E 35 switch galvanic 00014068 34 EIERE 16 Keyboard 1158 60 LCD characters register daer dese ek 49 LEDs EE 19 Logic output INEST TE 34 Mach3 configuring communications 24 data transfer eebe ebacacaeneasetes 24 enabling ModIO interface 0 0 0 0 25 Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide suppoer for ModIO sississccisscosanssnmdonrsacess testing ModIO wath used for trying out Modi using analog devices sdetgeseghegeskgeegereg using LCD display ei steckugeurgchue rechrgeneg using scanned Kewvboard EE MPG eebe SE Outputs SIS schematic diagram e scavecesdeaverasetenatersnese the VOut supply c cssscisisciiscssedanssancesnocsss Parameters 8 configuration display of Period 1157 register Pote XE Interfacing rotary switch XE Rotary switch interfacing ntiometer TSE FACING denge Power supply ala e R gt Power supply requirements 0sssnessesesse a E VE QUICK EE tiie R lighting and indicator eeeeeeeeeeeeeeees sensing a SEHR casssssavecssssovanasanerscstussys what YOU need assis cedsccintcnnddstndancdiade mddass RAM register block Register ADDRHI 100 leese AnalogIn 1152 3 4 COMMO TO EE gege 2 0 EE DEBUG 105 issn
22. 7 Mach Output 3 configured to ModIO discrete output 6 Figure 2 8 shows LED 6 on and figure 2 9 shows the corresponding screen setting Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide In practice of course an output would be controlled by something like MO07 MO8 coolant or a user macro in Mach3 You can show this by using Config gt Ports and Pins Spindle tab to JN eg aro set Mach3 output 3 to be the Flood 7 d coolant control Then your LED will turn on if you MDI an M08 or use the Flood coolant button and turn off with an M09 ZA E 6 at jE y Ei e 2 AS D lt zi RB ei e lt 6 D 9 6 2 d A Figure 2 8 LED 6 is ON Pin Number Figure 2 9 Config for LED 6 to be ON You might be confused by all the numbering so it is Relay Control m Moto worth summarizing it IV Disable Spindle Relays WU Ip e Every output signal in Mach has an internal ee eerie st CDA M4 Output 8 2 Cf number 1 to 20 o utput Signal s 1 6 PWME e In Config gt Ports and Pins Output Signals you link Food Mist Control ES or map these to a port and a pin number on I Disable Flood Mist relays Weil that port Mist M7 Qutput 3 Gene Flood M Output Cw Di e ModIO ouputs and inputs come to that are all ER opt referred to as being on Port 0 zero Printer ports ModBus S
23. 85 A I O RS 485 differential line A 2 RS 485 A I O RS 485 differential line A 3 RS 485 B I O RS 485 differential line B 4 RS 485 B I O RS 485 differential line B 5 GND Power Supply GND 6 5V Power Supply 5V 7 Din I Discrete Input 0 5V Shared with Scanned Keyboard data 0 8 DIn1 I Discrete Input 0 5V Shared with Scanned Keyboard data 1 9 DIn2 I Discrete Input 0 5V Shared with Scanned Keyboard data 2 10 DIn3 I Discrete Input 0 5V Shared with Scanned Keyboard data 3 11 GND Power Supply GND 12 DIn4 I Discrete Input 0 5V Shared with DigiSpeed Index Shared with MPG2 13 DIn5 I Discrete Input 0 5V Shared with MPG2 14 DIn6 I Discrete Input 0 5V Shared with MPG1 15 DIn7 I Discrete Input 0 5V Shared with MPG1 16 GND Power Supply GND 17 Vac Vdc Power Supply VIN 18 Vac Vdc Power Supply VIN Table 3 3 J10 or J12 I O Connector Inputs side Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide Note a In this revision of the manual these Data connections have been relabeled from 0 to 7 rather than 1 8 to correspond to the bit numberings in DIN and DOUT registers You do not need to change any existing wiring this is only a name change b For the remainder of this manual we will use the identifications 11 and 110 these should be taken as J2 and J12 on boards equipped with the 5 08mm terminals c
24. CD header J4 Boot oot Reset KEE Digispeed J15 Figure 3 2 Jumper Connector Identification Pin number Signal I O Comment 1 5v Power Supply 5V 2 Analog 1 Input I 0 5V Analog Input 3 Analog 2 Input I 0 5V Analog Input 4 GND Power Supply GND 5 Analog 3 Input I 0 5V Analog Input 6 GND Power Supply GND 7 VGnd Connect external VOut supply Ground here 8 VOut Device supply VOut It is a power input or output depending on JP3 9 DOut0 O Discrete Output Shared with Scanned keyboard column select 0 10 DOut1 O Discrete Output Shared with Scanned keyboard column select 1 11 DOut2 O Discrete Output Shared with Scanned keyboard column select 2 Shared with DigiSpeed Direction 12 DOut3 Discrete Output Shared with Scanned keyboard column select 3 Shared with optional DigiSpeed Enable 13 VOut Power Supply VOut Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide Pin number Signal I O Comment 14 DOut4 O Discrete Output Shared with DigiSpeed PWM signal 15 DOut5 O Discrete Output 16 DOut6 0 Discrete Output 17 DOut7 O Discrete Output 18 VOut Power Supply VOut see pin 3 Table 3 2 J1 or J2 1 0 Connector Outputs side Pin number Signal I O Comment 1 RS 4
25. E 58 6 4 5 1156 TickCtr Timing Tee EdNEEdNEEEENEeNEEdKAEENRREKAEANEEON REENEN NEEN 59 6 4 6 1157 Period Spindle speed measurement register eee ee eseeeeeeeeeneeeeeeenneeees 59 6 4 7 1158 Keyboard Scanned inputs EE 60 7T 55355 5dg ourovascnns lente naswasdiestaveenatnawsinasientoasatwaqdaadswasta pensiaesarasaneenagsuatiatace 61 TL PPS ANAND E 61 7 2 Connecting to the ModIO and erasing Taeh 62 oe EE 62 e E 63 deR etae ee a gene ubvaiecevboyeddubiea tive vines ER R E 64 9 Copyright 2006 Homann Designs Revision 0 92 ModlIO M100 Modbus Interface Unit Users Guide Page 5 1 Introduction Thank you for purchasing Homann Designs ModIO M100 Modbus interface unit The M100 provides a general purpose interface unit with a Modbus RS 232 and RS 485 serial interface for communication with a Modbus Master This document is a User s Guide that describes the ModIO M100 Modbus interface unit The document contains information on how to use and integrate the board into your own systems 1 1 Contents The box received when ordering the ModIO M100 Modbus interface unit contains the following e The ModIO M100 Modbus interface board e A serial cable DB9 male to 10 pin 2 x 5 0 1 boxed header for connecting e An optional 4x20 Character LCD display for use with the M100 1 2 Features Homann Designs ModIO M100 Modbus interface unit lets you quickly and simply add additional
26. Many functions share the DIn and DOut pins with the main discrete input register and discrete output register The details are given in the individual sections of the manual The terminology DOUT and DIN refers to the actual bits of the discrete output and input registers while DOut and DIn refer to the signals whatever their source or destination e g MPG logic PWM generator keyboard scanner etc 3 4 Jumpers The ModIO also contains a number of jumper that allow the board to be configured The connectors are listed in Table 4 below The location of the connectors is indicated in figure 3 2 Jumpers Description Comment Reference S2 Slave Id Default 16 position Hex Config switch J13 DigiSpeed Enable 3 Pin 0 1 Jumper source JP1 Boot Select 2 Pin 0 1 Jumper See Firmware programming section JP2 spare 2 Pin 0 1 Jumper Leave open JP3 Vout Source 3 Pin 0 1 Jumper See Discrete Outputs section JP4 RX Receive Source 3 Pin 0 1 Jumper See Communications Section H F JP5 RS 485 Duplex Select 2 Pin 0 1 Jumper See Communications Section RXP J6 RS 485 RX Polarity 2 Pin 0 1 Jumper See Communications Section JP7 Not used JP8 RS 485 A Load 2 Pin 0 1 Jumper See Communications Section JP9 RS 485 B Load 2 Pin 0 1 Jumper See Communications Section TXP J10 RS 485 TX Polarity 2 Pin 0 1 Jumper See Communications Section BL JP11 LCD Back light 2 Pin 0 1 Jum
27. O M100 Modbus Interface Unit Users Guide 6 4 4 1155 Encoder2 MPG Encoder read register 6 4 4 1 Overview The ModIO provides an interface for two MPG Manual Pulse Generator inputs The interface is provided primarily for 100 ppr pulses per revolution encoders as found on CNC pendants and controllers Note The MPG interface is not designed for high resolution encoders as found on servos etc The MPG interface may lose steps if the encoder generates more than 1000 pulses second The MPG interface is enabled by default but may be controlled via configuration register CONFIG2 Each MPG may be enabled disabled independently Additionally the encoder count for each encoder may be divided by four if desired Each encoder interface generates a 16 bit up down counter which rolls under over once the 16 bits have been exhausted Encoder 2 shares pins 12 and 13 with DIn 4 and DIn 5 Register 1156 TickCtr give the time in ticks since an MPG register was read This is used by Mach3 to calculate the speed of rotation of the MPGs 6 4 4 2 Register Use Summary Address Name Bit7 15 Bit614 Bit5 13 Bit6 12 Bit3 11 Bit2 10 Bit1 9 Bit0 8 106 lt 15 8 gt CONFIG2 106 lt 7 0 gt CONFIG2 DSOFF UHSE2 UHSE1 UENC2 UNCI 1150 lt 15 8 gt MPG1 B15 B14 B13 B12 B11 B10 B9 B8 1150 lt 7 0 gt MPG1 B7 B6 B5 B4 B3 B2 B1 BO 1155 lt 15 8 gt MPG2 B15 B14 B13 B12 B11 B10
28. OV 0 Input is Inactive 5V Bit 5 DINS Discrete Input 5 J10 12 Pin 13 1 Input is Active OV 0 Input is Inactive 5V Bit 4 DIN4 Discrete Input 4 J10 12 Pin 12 1 Input is Active OV 0 Input is Inactive 5V Bit 3 DIN3 Discrete Input 3 J10 12 Pin 10 1 Input is Active OV 0 Input is Inactive 5V Bit 2 DIN2 Discrete Input 2 J10 12 Pin 9 1 Input is Active OV 0 Input is Inactive 5V Bit 1 DINI Discrete Input 1 J10 12 Pin 8 1 Input is Active OV 0 Input is Inactive 5V Bit 0 DINO Discrete Input 0 J10 12 Pin 7 1 Input is Active OV 0 Input is Inactive 5V Legend R Readable Bit W Writable Bit U Unimplemented I bit set 0 bit cleared A bit Unknown Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide Address Name Bit7 15 614 Bit5 13 Bit6 12 Bit3 11 Bit2 10 Big Bit0 8 101 lt 15 8 gt CONFIG 2 101 lt 7 0 gt CONFIG DBEL PDL2 PDLI PDLO UPMP UDIS UANA ULCD 1151 gt 15 8 lt DIN 1151 lt 7 0 gt DIN DIN7 DIN6 DINS DIN4 DIN3 DIN2 DINI DINO Table 6 10 Registers associated with Discrete Inputs Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 6 4 3 1152 1153 1154 Analog in Registers 6 4 3 1 Overvi
29. a 11 Pins 2 3 amp 5 LCD interface L l MPG1 1 m J10 Pins 14 amp 15 MPG1 Hi res H h MPG2 2 m J10 Pins 12 amp 13 PWM output for DigiSpeed P p 11 Pin 14 Frequency counter F f J10 Pin 4 Keypad scanner K k J10 Pins 7 10 amp J1 Pins 9 12 Enforce serial interchar gap rules G g Limit serial error flash to duration E e of error state ModIO debug mode selected D d Hardware firmware debug only If enabled it Disables the discrete outputs Default parameters in use DEF The LCD displays the programmed values The ModIO after Reset uses the default ones Illustration 3 3 shows a sample screen display 3 7 2 Slave addressing Each Modbus device and with RS 485 there can be many on one bus has a Slave Address which defines the messages to which it will respond This is configured by a 16 position miniature rotary switch See figure 3 4 Position 0 of this switch is reserved to define the Default Configuration Note Changes to the switch do not take effect until Figure 3 4 Slave address switch and after the ModIO is reset power LED Note It is Highly recommended that you operate the ModIO with the default configuration switch position 0 selected until there is a need to alter the unit s configuration and you become confident understanding the operation of the ModIO To enable the Default configuration 1 Switch the slave address switch to 0 2 Press the R
30. able discrete I O OR 40 UENC1 use encoder ccccccereees 47 UENC2 use 60001072 47 UHSE use high resolution encoder 47 UHSE2 use high resolution encoder2 47 ULCD Enable Disable LCD I O interface Via A0 UPMP Enable disable charge pump 40 Bits MD UART mode control ssaennnneaea 41 PDL charge pump timeout delay 40 SPD baud rate 0001 41 COMMO 102 register 41 CONFIG 101 register 40 Config change seems not to work 26 CONFIG2 106 register 47 0 Configuration default values OF wccescsccesescectcocsasitoccineans 18 Configuration 2810678 17 Connector fOr 13 TOT OULDUES ee 13 Connectors TE EE 13 Copyright 2006 Homann Designs DEBUG 105 register ec eeeeeeeeeeeeeeee 46 Default configuration use of to recover a corrupt state 26 DigiSpeed 23 Dimensions of Modi 13 DIN 1151 register E 55 EE 21 Discrete 0 22 DOUT 1040 regteter ee eeeeteees 51 Encoder 1050 register eee 54 Encoder2 1050 register ee eeeeeeeee 58 Encoders ANSI ACTING pac ee 35 Expansion interface Ip 23 External logic stage 34 Feature summary sansa cossacwsaraneancansnidacansneseetes 5 FLASH 103 EISEN geet ekegeek gege 42 Inputs CISC TOUS A geccanscesenacetsaguaneeassuasntesanesanaleuenct 21 interfacing from logic 34 schematic 1 21 Interface LR 23 e 23 eher
31. al Shared with DOut3 or jumpered to GND by JP13 4 Direction O Motor Direction Signal Shared with DOut2 5 Index I Motor Spindle Index Signal Shared with DIn4 6 5V Power Supply to Digispeed 5V Table 3 7 J5 DigiSpeed DC Motor Controller Interface Connector Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 4 Modi support in Mach3 This chapter gives you details of the way you configure Mach3 for the full range of input and output devices and gives examples of some user code to exploit them The Mach3 ModBus interface is subject to a proposal for redesign so information here is limited to that required for use of the current software 4 1 Introduction to data the autopoller and macropump The ModBus interface is a very polite thing The slave ModIO never speaks until spoken to by the master the PC The implication of this is that the PC has to keep asking the ModIO what the state of its inputs are Mach3 has a buffer called Input of 128 x 16 bit words for data input to it from the ModBus device and another called Output of another 128 words of data destined to be sent to the ModBus device In addition to these buffers is another 40 word buffer used to send data to the LCD A task in Mach3 called the AutoPoller runs periodically by default 20 times per second The AutoPoller sends data to the ModBus device and reads data from it It is responsible fo
32. ce 1 Disable Debug Interface 0 Enable Debug Interface Bit 6 4 PDL2 PDLO Charge Pump Timeout Delay 000 325ms 001 650ms 010 1 30S 011 2 60S 100 5 20S 101 10 4S 110 20 8S 111 41 6S Bit 3 UPMP Use Pump Enable Disable the ModIO Charge Pump 1 Enable the Safety Charge Pump 0 Disable the Safety Charge Pump Bit 2 UDIS Use Discretes Enable Disable the ModIO Discrete I O interface 1 Enable the Discrete IO Interface 0 Disable the Discrete IO Interface Bit 1 UANA Use Analogs Enable Disable the ModIO Analog inputs interface 1 Enable the Analog Input Interface 0 Disable the Analog Input Interface Bit 0 ULCD Use LCD Enable Disable the ModIO Character LCD interface 1 Enable the LCD Interface 0 Disable the LCD Interface Legend R Readable Bit W Writable Bit U Unimplemented T bit set 0 bit cleared A bit Unknown Copyright 2006 Homann Designs Revision 0 92 ModlIO M100 Modbus Interface Unit Users Guide 6 2 3 102 6010 UART Configuration Control Register R W 1 R W 1 R W 1 R W 1 R W 1 U 1 R W 1 SPD2 SPD1 SPDO MD1 MDO LEF UCG Bit 7 Bit 7 5 Bit 4 3 Bit 2 Bit 1 Bit 0 Bit 0 SPD2 SPDO UART Baud rate control bits 000 9 600 Baud 001 19 200 Baud 010 34 400 Baud 011 56 000 Baud 100 56 700 Baud 101 115 200 Baud 110 230 400 Baud 111 56 700 Baud MIDI MIO
33. ce 1 Disable the Period Measurement Interface 0 Enable the Period Measurement Interface Bit5 KBOFF Keyboard Enable Enable Disable the ModIO 4x4 Keyboard matrix interface 1 Disable the Keyboard Interface 0 Enable the Keyboard Interface Bit 4 Unimplemented Bit 3 UHSE2 Use High Resolution for Encoder 2 Enable Disable the quadrature edge transition detection 1 Count all 4 edge transitions per pulse 0 Count on transition per pulse only Bit 2 UHSE1 Use High Resolution for Encoder 1 Enable Disable the quadrature edge transition detection 1 Count all 4 edge transitions per pulse 0 Count on 1 transition per pulse only Bit 1 UENC2 Use Quadrature Encoder 2 Enable Disable the ModIO Quadrature Encoder Counter 2 interface 1 Enable the Encoder 1 Interface 0 Disable the Encoder 1 Interface BO UENC1 Use Quadrature Encoder 1 Enable Disable the ModIO Quadrature Encoder Counter 1 interface 1 Enable the Encoder 1 Interface 0 Disable the Encoder 1 Interface Legend R Readable Bit W Writable Bit U Unimplemented T bit set 0 bit cleared A bit Unknown Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 6 3 RAM Register Block The RAM register block is implemented in RAM within the PIC This area is volatile and all data is reset to 0 on power up Each register is 16 bits and may be written to and read from The acces
34. crete outputs The analog inputs are enabled the LCD interface is enabled You may however need to change these and may wish to configure the ModIO board This is done by the Config button on the ModBus Status amp Control dialog which is just below the MODIO ModBus card checkbox See figure 4 2 Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide This Config button opens a new dialog as shown in figure 4 3 Notes a It is very important to realize that using this dialog displays and reconfigures the ModIO hardware That is to say it rewrites the data in the flash memory of the PIC b If you are set to default configuration hex switch position 0 then this is not the configuration actually being used by the ModIO c Changes to a hardware configuration do not occur until you Reset the ModIO d If you change some Configure MODIO ModBus device Config Reg 102 MV UseLCD IV Use Analogues IV Use Discretes I Use Pump IV Disable Debug Pump Delay Fo Reg 3 JV Use Char Gap Limit Err Flash Speed 57600 Protocol Sp DI Flash config 104 Flash Mask 255 RESET MODIO gt Config 2 106 IV MPG1 Hi Res On IT MPG2 Hi Res On Use MPG1 connected to pins 7 8 Use MPG2 connected to pins 5 6 IV Freq Cnt Off IV KeyPad Off IV Digispeed OfF Send Config Fig
35. d Use Config gt Ports and Pins Spindle Setup tab to configure Mach3 as shown in the ringed parts of figure 4 4 When the S word is set by G code to the S DRO equal to the maximum speed for the currently selected pulley then the ModIO will output a 100 ON PWM signal giving full input voltage on the motor drive circuit Similarly id S is half the maximum speed then a 50 PWM signal will be generated Configure a Mach3 output signal 2 in the example above to be Port 0 Pin 2 DOut 2 to control the motor direction Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 4 7 Using analog inputs Analog inputs accept an input voltage from 0 to 5 volts DC This will often be derived from a potential divider potentiometer between the ModIO 5 volt rail and ground The relevant register is set to a value between 0 0 volts and 1023 5 volts Analog is in Input 64 Analog is in Input 65 Analog3 is in Input 66 The following fragments of code from MacroPumps show how the data can be used in Mach3 Macropump for setting Feed rate override from a potentiometer on Analog3 Option Explicit Dim fro As Integer fro GetInput 66 read Analog3 fro fro 95 0 1024 0 setDRO 21 frotd range is now 5 to 100 The idea here is that the full range of the potentiometer sets the feed rate override from 5 minimum to 100 maximum This second code supports t
36. d IO from pins 64 127 Figure 2 4 A default Modbus configuration in Mach3 This complex looking screen allows Mach3 to be used with virtually any Modbus device e g a custom programmed PLC Mach3 is aware of the arrangement of registers in the ModIO and will replace this arbitrary configuration with one optimised for ModIO when you check the MODIO ModBus card checkbox The screen will then look like figure 2 5 ModBus Status amp Control E m Comm Port Test ModBus Port Num 1 Baud Rate 57600 8 1 N zi IT Use RTS for transmit R5485 Timeout Ten ms eceive Timeout Status m AutoPolling Option On Slave Addr Start Reg Registers Ze Input Holding Coils Discrete Mapped to Inputs pin 0 3 7 1150 1 GER fe Input Holding Coils Discrete Mapped to Inputs pin 64 127 Ze m i ioo 0 po mo Update Frequency 20 Hz MODIO Device Support Output 2 Holding Coils Mapped to outputs 0 3 Holding Coils Mapped to outputs 64 127 Special Control I Use each input word as 16 bits of Bitmapped Input instead of mapped inpuMax of 64 bits IT Map outputs 1 64 as 6 bits of Bitpacked output 9040 Config instead of mapped outpuMax of 64 bits Auto Bitpacking in effect f jpg 2 J OEM Control code incomng on Register To in MODIO mode of the mapped IO from pins 64 127 Apply
37. d chopper DC speed Port Setup and Axis Selection Motor Dutputs Input Signals Output Signals Encoder MPG s Spindle Setup Min Options controllers and allows Pulley Ratios ft trol of th i Use Spindle Motor Duo Current Pulley Set Min Speed Max Speed software control of the Coe as C PWM Control oo Bes indl d CEW M4 A Step Dir Motor n E sp n e spee 2 2 IT Torch Volts Control eu Ratio RPM Ne cue se H s 16 PWMBaseFteq E Puley Ratioa fo Jm It is supported by Mach3 z 0 e th PWM 1 1 dth Disable Flood Mist relays m e pu se W Mist Mi Output E Genera Pafatfeters _ Special Functions _ modulated mode Flood M8 Output it P Ge Se S i Seconds F Laser Mode freq by Feedrate i Seconds Use Spindle Feedback in Sync Mode us Spindle Use Step Dir as e EW Delay Spind DOWN f1 Seconds 60 1 1 Enable the inter face in I Closed Loop Spindle Control faa 5 IN E Enabled Ren 64 127 CW Delay Spin DOWN T Seconds a ee 6 SE Max ADC Count been IT Immediate Relay off before delay I Spindle Speed Averaging evice dialog by unchecking Digispeed x aw Off See figure 4 3 Click si d Con fig Set Figure 4 4 Spindle setup remember to reset the ModIO The DigiSpeed uses discrete outputs DOut 3 and DOut 4 and optionally DOut 2 so you will not be able to use these for other purposes e g a scanned keyboar
38. e debug configuration that is selected Although configured for four rows of 20 characters smaller display sizes may be used Figure 6 1 System data in LCD Figure 6 2 User data in LCD 6 3 1 1 LCD data Registers The ModIO LCD interface provides for a 4x20 character display Each 16 bit register holds two 8 bit ASCII characters The LCD registers start at address 1000 and continue through to 1039 forty registers in total By writing to a register the characters will be displayed on the LCD 6 3 1 2 LCD Connector Interface The ModIO LCD interface interfaces to the LCD via a standard 16 pin 0 17 IDC Box header J4 Table 6 5 below details the signal connections to the connector The interface is configured in 4 bit mode Power for a LED back light is provided and will provide about 240mA at 5Vdc if other output devices are powered by an independent VOut power supply Insert jumper B L to enable the LCD backlight If it is vital for additional current to be supplied to the LCD then an external 5Vdc power supply may be used Consult Homann Designs for details of its connection Note An external current limiting resistor will be required The contrast of the LCD is adjusted by trimpot VR1 The trimpot is set at the factory for a standard 4x20 display It should not need to be adjusted by the user Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide
39. e of the mapped IO from pins 64 127 Figure 4 2 Configuring ModBus control Under MODIO Device Support check MODIO ModBus card If this was previously unchecked you will notice that many of the values in the dialog box change automatically You are initially advised to work with the default ModIO configuration This corresponds to the values set by Mach3 when MODIO ModBus card is checked except that you need to alter Slave Adar to 6 in the two places indicated in figure 4 2 The other change that might be required is if you are not using COM1 as the serial port Set Port Num to the in the COMn That you are using Do not alter any other values in the dialog they are there for devices like PLCs When you have done this click Apply and the red and green LEDs on the left hand side of the RS 232 header J7 should be flashing rapidly and No Error should be indicated in Status If this does not happen revisit the Quick Start guide of chapter 2 and get this going again If you click OK the dialog will dismiss but as it is running at the same time as Mach3 will still appear on the task bar You can re open it from there or the Mach3 Config menu whenever required 4 3 Enabling the ModlO interfaces The default configuration is suitable for many applications It provides 8 discrete inputs with the two MPGs enabled in high res mode i e one cycle of quadrature pulses gives one count and 8 dis
40. e output as defined in below The output is made active by setting the bit to 1 When the output is active the output is pulled to Ground and LED is illuminated The ModIO may be configured to disable the discrete inputs and outputs That said it would be unusual to have a need to do so To disable the discrete set bit ULCD CONFIG lt 2 gt to 0 6 3 2 1 Bit allocation in DOUT R W X R W X R W X R W X R W X R W X R W X R W X DOUT7 DOUT6 DOUTS5 DOUT4 DOUT DOUT2 DOUT1 DOUTO Bit 7 Bit 0 R W 0 R W 0 R W 0 R W 0 R W 0 R W 0 R W 0 R W 0 Bit 15 Bit 8 Bit 15 8 Unimplemented Bit 7 DOUT7 Discrete Output 7 J1 2 Pin 17 DOut7 1 Input is Active OV 0 Input is Inactive VOut Bit 6 DOUTS Discrete Output 6 J1 2 Pin 16 DOut6 1 Output is Active OV 0 Output is Inactive VOut Bit 5 DOUTS Discrete Output 5 J1 2 Pin 15 DOutS5 1 Output is Active OV 0 Output is Inactive VOut Bit 4 DOUT4 Discrete Output 4 J1 2 Pin 14 DOut4 1 Output is Active OV 0 Output is Inactive VOut Bit 3 DOUTS3 Discrete Output 3 J1 2 Pin 12 DOut3 1 Output is Active OV 0 Output is Inactive VOut Bit 2 DOUT 2 Discrete Output 2 J1 2 Pin 11 DOut2 1 Output is Active OV 0 Output is Inactive VOut Bit 1 DOUTI Discrete Output 1 J1 2 Pin 10 DOut1 1 Output is Active OV 0 Output is Inactive VOut Bit 0 DOUTO Discrete Out
41. eenneeeeeeeeeeeeeennaeeeeeeeeeeseees 42 6 2 0 104 PUMP Pump Control Register ss c csscssssarasnninessnassvacsoseresonauiyenavananauanauvesavauays 44 6 2 6 105 DEBUG ModIO Debug control register eeeeceeecceeeeeeeeeeneeeeeeeeeeeeees 46 6 2 7 106 CONFIG2 Configuration control register 7 47 0 RAM R zister Eegeregie Eege 48 6 3 1 1000 1039 Liquid Crystal Display Controller registers 2 0 0 0 ee eeeeeesseeeeeeeeneeees 49 IC e E ei E 49 Gol ECD Connector Oe 49 6 3 1 3 Register Use vale setaatscided aacsapaatncenveads 50 6 3 2 1040 DOUT Discrete Output Register 5 5 6 scapntavessdisasssnnslaviiessdeavtonndansteigdeweeassaneie 51 6 3 2 1 51 6 3 2 2 Discrete Output Safety Charge Pump 0cccc ccccassssscachecastensseaseccacnasecasasasgaseanesecs 52 6 020 Regist r Use SUMMAT Y EE 52 6 4 1041 SSPEED PWM for DigiSpeed unit 200 0 eee eeeeeesseeeeceesseeeeceesnnceeeesssaeeeereaaes 53 6 4 1 1050 Encoder1 MPG Encoder read register ssscscccccasasceesscsadsasateseeaseanadnesacenaeasesieess 54 6 4 1 1 RIV OI VIGW saisan ie ae ENA E EEE E E E E EE 54 6 4 1 2 Register Use Ee Agekteg Gees eekEe eech eher 54 6 4 2 Lisl DIN Discrete et 55 6 4 3 1152 1153 1154 Analog e 57 6 4 3 1 OVV EW eege 57 6 4 3 2 Regist r Use SUMAT EE 57 6 4 4 1155 Encoder2 MPG Encoder read register eee eeeeeneeceeeeeeeseeeenneeeeeeeeeeeeees 58 6 4 4 1 8 58 6 442 Use Summat y orses E E E RIN
42. er For example to access the Limit Error Flash control bit LEF Bit 2 of the ModIO UART configuration control register Address 102 LEF bit address 102 16 2 4 Table 6 2 shows the memory map for the ModIO devices Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide Register Block Address 0000 ROM REGISTERS 0047 0048 Not Used 0099 100 CONFIG REGISTERS 200 201 Not Used 999 1000 RAM REGISTERS 1249 Table 6 2 ModIO Register Block Map 6 1 ROM Register Block To be defined in a later version of this manual 6 2 Configuration Register Block The config register block is implemented as EEPROM memory This memory is non volatile and will retain its values once set even when the ModIO is powered down It is used to set up the ModIO Configuration Even though the registers in the Config block are 16 bit only the lower 8 bits of each register are utilized When writing to the Config Block the upper 8 bits of the register are ignored When Reading from the Config Block the upper 8 bits are set to 0 Additionally when writing to the Config Block registers can only be written to one at a time The ModIO Config Block contains the registers as shown below in table 6 3 Note Any changes made to registers in the Config Block will only take effect after pressing the Reset button or after Power Up Address Name Copyrigh
43. eset Switch or cycle the power to the ModIO On Bootup the ModIO will be configured to e Modbus Slave address of 6 e Communication settings of 57 600 Baud 8 bit data 1 Stop bit No parity Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide e LCD Interface Enabled e Discrete I O Interface Enabled e Analog Interface Enabled e MPG 1 amp 2 Enabled Hi Resolution Mode e Limit Error Flash Enabled e Flash Discrete outputs Disabled e DigiSpeed Interface Disabled e Debug Interface Disabled Note If you have the LCD display connected then it will indicate the configuration currently programmed into the ModIO not the parameters of the Default configuration that you will be using This is state is indicated by the characters DEF on the bottom line of the display 3 8 Status LEDs 3 8 1 Power LED The green LED on the edge of the board by the Slave Address switch shows that the board has 5 volt power available 3 8 2 Error LED The red LED above the Power LED is an Error Indication The LED is capable of indicating 2 types of errors e Flashing Modbus Communication Error Indicates that a error has been detected during serial communications gt Solid ModIO Internal Error Indicate an error internally within the Unit Selecting an invalid Slave address will cause such an error Note The Modbus Specification requires that once an error is detected t
44. ew The ModIO provides three analog to digital A to D inputs These inputs are Voc provided primarily for the connection of potentiometers either rotary or with switched discrete resistors for use as variable input devices such as speed or feed rate control inputs ModlO Microcontroller The reference voltage for the analog to digital converter is 5V Therefore the analog brornzeseerenoe GND voltage inputs are limited to 0 5Vdc The Analog interface is enabled by default 6 but may be controlled via the Use Analogs Bit UANA of configuration register Figure 6 3 Analog Input Schematic CONFIG2 Each of the three analog to digital converter inputs convert the analog input voltage to a 10 bit variable that ranges from 0 to 1023 6 4 3 2 Register Use Summary Address Name Bit7 15 Bit614 Bit5 13 Bit6 12 Bit3 11 Bit2 10 Bit1 9 Bit0 8 101 lt 15 8 gt CONFIG 5 101 gt 7 0 lt CONFIG DBEL PDL2 PDL1 PDLO UPMP UDIS UANA ULCD 1152 lt 15 8 gt ANA1 B9 B8 1152 lt 7 0 gt ANA1 B7 B6 B5 B4 B3 B2 B1 BO 1153 lt 15 8 gt ANA2 B9 B8 1153 lt 7 0 gt ANA2 B7 B6 B5 B4 B3 B2 B1 BO 1154 gt 15 8 lt ANA3 B9 B8 1154 lt 7 0 gt ANA3 B7 B6 B5 B4 B3 B2 B1 BO Table 6 11 Registers associated with Analog to Digital Interface Copyright 2006 Homann Designs Revision 0 92 Modl
45. he indicator remains latched until the unit is reset This feature can be inconvenient when debugging communication errors such as an intermittent fault The ModIO contains a configuration bit LEF b2 in register 102 COMMO that allows the latching of an error to be disabled When this bit is 1 the Indicator will extinguish shortly after the error condition is removed 3 8 3 Transmit Receive LEDs The LEDs mounted on the board edge to the left of the RS 232 connector indicate the reception of data by the ModIO green and transmission of data by it to the PC red Hint When Mach3 is running if the green LED flashes but red LED is not flashing then it is almost certain that the values of slave address are configured differently in Mach3 and the ModIO 3 8 4 Pin status 5 Each of the 8 discrete outputs and inputs has a surface mount LED on the board near to its terminal The LEDs indicate an active i e Lo state on the corresponding pin Note On first reading you may wish to skip the remainder of this chapter Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 3 9 Modbus Communication interface 3 9 1 RS 232 versus RS 485 The ModIO contains an RS232 and RS 485 serial interface Both of these interfaces are used by a single UART on the ModIO Therefore only one of the interfaces may be used at any one time 3 9 2 RS 232 Interface The connector for this bus is a 10 pi
46. he regular red green flashing when the ModIO is connected to your running Mach3 Recheck connections that the ModIO is running the default configuration and that the Config gt Setup ModBus Control dialog looks correct If all is well you can control your first output device 2 3 Lighting an LED The ModIO has 8 digital outputs each with an indicator LED on the board If the power jack is on the right hand side of the board then these LEDs are above the connector on the bottom edge The outputs are numbered 0 to 7 from left to right These numbers correspond to setting Port 0 Pins 0 to 7 in the Config gt Ports and Pins Output Signals tab Within Mach3 the Engine Configuration Ports amp Pins x outputs which can be Port Setup and Axis Selection Motor Outputs Input Signals Output Signals Encoder MPG s Spindle Setup Mill Options controlled from parallel Active Low port ModIO or in x 0 o x MachIV the GRex are V b numbered 1 to 20 x o 0 x x 0 0 x Figure 2 7 shows Mach x o o 5 output 3 configured to 5 we ModIO Discrete o 0 0 0 Output 6 Output 6 x o 0 x Do this on your system Pins 2 9 1 14 16 and 17 are output pins No other pin numbers should be used and click Apply ok Se Now if you change the Active Low column for your output you will be able to turn the LED next to the right end for Discrete Output 6 on and off Figure 2
47. he schematic in figure 5 7 Macropump for setting Jog Mode thru Analog In MPGAxis GetInput 64 analog Input 1 0 Select Case MPGAxis Case lt 100 do nothing State 0 Case lt 300 If GetOEMLED 14 0 Then If not Set to Continuous Jog Mode DoOEMButton 276 Set Jog To continuous End If If State lt gt 1 Then Speak Continuous End If State 1 Case lt 512 If GetOEMLED 15 0 Then If not Set to Step Jog Mode DoOEMButton 275 Set Jog To Step End If If State lt gt 2 Then Speak Step End If State 2 Case lt 715 If GetOEMLED 57 0 Then If not Set to MPG Jog Mode DoOEMButton 327 set Jog to MPG End If If GetOEMLED 59 0 Then DoOEMButton 185 set MPG Jog to X End If If State lt gt 3 Then Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide Speak End If State 3 Case lt 920 If GetOEMLED 57 0 Then If not Set to MPG Jog Mode DoOEMButton 327 set Jog to MPG End If If GetOEMLED 60 0 Then DoOEMButton 186 set MPG Jog to Y Speak y End If State 4 Case gt 920 If GetOEMLED 57 0 Then If not Set to MPG Jog Mode DoOEMButton 327 set Jog to MPG End If If GetOEMLED 61 0 Then DoOEMButton 187 set MPG Jog to Z Speak z End If State 5 End Select The
48. in iioii eege DOUT gt Copyright 2006 Homann Designs Encoder1 54 Encoder2 egen reteigeueEekgekuerh 58 FLASH 10S EE 42 Keyboard 11 E 60 E 59 Si BA Lt EE 44 SSPEED trem tren 53 TickCtr 1156 oieee 59 Registers gebeten Seechen Seege 36 LCD characters XE LCD characters register 1000 1009 49 ROM CONFIG SRAM 36 Relay AUST ACID seissen eenean E 33 Re programming the Drmware 61 Reset required for ModIO config change to be 26 Res t SWCD EE 17 Rotary switch EE IAC MAS egenen 35 RS 232 connector pinout sseccs2ccnsesecdeaeiasesssaceseteees 20 RS 232 interface LOA EE 7 RS 232 vs RS 485 E 20 RS 485 0 iere 20 RS 485 vs RS 232 oocsaicsnessassseedenecssssanccssedae 20 Slave addressing aj ccccshanasaneedersenediassvatensscase 18 SSPEED 1041 register SSPEED 10l E 53 E CAE TR 19 Switch ING egener ege 34 31 018601 Test reading Test writing registers 4 32 59 1156 TickCtr VOut supply for 08 22 Revision 0 92
49. ins Lin Hex 0 9A F ony E Port Setup and Axis Selection tab After checking this close and reload Mach3 with your ModIO profile Pins 2 9 as inputs I Sherline 1 2 Pulse mode e g ModBus InputOutput Support You will then be able to access 45000Hz Config gt Setup ModBus Control This is illustrated in figure 4 2 I Event Driven Serial Control J Servo Serial Link Feedback Figure 4 1 Enabling ModBus support Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide ModBus Status amp Control r Comm Port No error A Test ModBus Port Num l 1 Status Baud Rate 57600 e n zl Use RTS for transmit R5485 Timeout 50 ms m AutoPolling Option Input On Slave Addr Start Reg Registers 1150 Input Holding Coils Discrete Mapped to Inputs pin 0 63 Ti Input Holding Coils Discrete Mapped to Inputs pin 64 127 e ae ti 1040 Ze Holding Coils Mapped to outputs 0 63 19 o T Holding Coils Mapped to outputs 64 127 Update Frequency 20 Hz p Special Control Apply I Use each input word as is bits of Bitmapped Input MODIO De e instead of mapped inpuMax of 64 bits J Map outputs 1 64 as ie bits of Bitpacked output mm wv MPG 1 instead of mapped outpuMax of 64 bits Auto Bitpacking in effect we 2 7 OEM Control code incomng on Register 0 in MODIO mod
50. is to disable selected outputs if communications with the ModBus Master are disrupted If the Master computer or it s software malfunctions then the Safety Charge Pump will deactivate those inputs selected to be controlled by the charge pump The Charge Pump facility is enabled disabled by the UPMP bit CONFIG lt 3 gt If set default condition the facility is enabled If the bit is cleared then the facility is disabled and not used The timeout period required to invoke the Safety Charge Pump is controlled by the Charge Pump Delay PDLO 2 CONFIG lt 6 4 gt If the Safety Charge Pump is enabled then individual Discrete outputs may be selected to be under the control of the Safety Charge Pump by setting or clearing the corresponding bit in the PUMP configuration register at address 104 When a bit Set the corresponding Discrete output will turn off if at least one ModBus message is not received during the timeout delay period R W 1 R W 1 R W 1 R W 1 R W 1 R W 1 R W 1 R W 1 CPE7 CPE6 CPE5 CPE4 CPE3 CPE2 CPE1 CPEO Bit 7 Bit 0 Bit 7 CPE7 Discrete 7 Pump Enable 1 Enable Pump output control 0 Disable Pump output control Bit 6 CPE6 Discrete 6 Pump Enable 1 Enable Pump output control 0 Disable Pump output control Bit 5 CPES Discrete 5 Pump Enable 1 Enable Pump output control 0 Disable Pump output control Bit 4 CPE4 Discrete 4 Pump Enable 1 Enable Pump output control 0 Disable Pump
51. lties then an understanding of what you are aiming to do and a systematic set of testing steps will ensure your success This manual contains many diagrams showing interface connections but if you have difficulty in understanding them you are strongly advised to seek assistance from someone with electronics experience Incorrect connections could damage the ModIO and or the equipment to which you are interfacing 2 1 What you need To get started you need e a ModIO board e a toggle or push switch with two flying leads e a power supply e g wall wart aka plug top transformer delivering 6 to 18 volts AC or 8 to 24 volts DC via a 2 1 mm coaxial jack e a lead with a D9 Male connector at one end the ModIO and a D9 Female connector at the computer end e aPC with a serial COM port available and Mach3 installed on it e and ideally an LCD connected to the ModIO With the power to PC and ModIO switched off connect the ModIO to the PC by the serial cable and RS 232 ribbon cable supplied with the ModIO This plugs into J7 which is between the two sets of LEDs which face the edge of the board If you have the LCD plug it into J4 Check that the jumpers are in their default positions as shown in figure 2 1 Notice that the jumpers and pins have been highlighted for clarity of illustration Switch the hex rotary switch figure 3 4 to 0 zero This gives the default configuration of all ModIO parameters e g
52. mpering option as described in Table 3 4 The meaning of these jumpers is as follows RX Receive source JP4 Should be in position 1 2 for RS 485 communications and position 2 3 for RS 232 Copyright 2006 Homann Designs Revision 0 92 ModIO M100 Modbus Interface Unit Users Guide Page 21 communications If it is in the wrong position then data will not be received from the interface intended RS 485 Duplex Select H F Should only be inserted in the exceptional event of using 2 wire half duplex operation RS 485 Receive polarity JP6 Normally open jumper to invert Mark Space polarity RS 485 A load JP8 This jumper should be in for the last only ModIO on the bus It terminates the line with a 120R load RS 485 B Load JP9 This jumper should be in for the last only ModIO on the bus It terminates the line with a 120R load RS 485 TX Polarity JP10 Normally open jumper to invert Mark Space polarity 3 10 Discrete Inputs The ModIO provides 8 Discrete inputs Din0 to DIn7 which feed the DIN register Some also are used for the MPGs and the scanned keyboard logic These are accessed via pins on J10 ev VCC 5Vdc They operate as Active Low That is the input device needs to connect the relevant DIn pin to Ground to represent ModlO the active state rae Microcontroller DIN Each input contains a pull up resistor allowing it to be used with switches or
53. n Port 0 i e the ModIO Pin 1 i e Din 1 Figure 2 11 Switch connected to terminals This is shown in figure 2 12 5 and 8 of Input side of Modi When you go to the Mach3 Diagnostics screen you will see Input 3 lighting when you press the switch Port Setup and Axis Selection Motor Outputs Input Signals Output Signals Encoder MPG s Pin Number Active Low Emulatec Note If you are following very carefully you might spot that we have the switch Figure 2 12 Configuring a ModIO input connected so it pulls the input low when active but did not select Active Low in Config gt Ports and Pins This is a feature or perhaps more properly bug of the current release of Mach3 If your ModIO works with these two simple tests then you are in a position to configure it and Mach3 interfaced to an actual machine tool Congratulations The next chapter gives details of all the physical interfaces Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 3 Board Description 3 1 Introduction This section tells you about the mechanical and electrical aspects of the ModIO board On first reading you probably do not need Power Connector to read beyond the description of the i LEDs and their functions 4 no Holes 3mm dia View from component side 3 2 Overview The board is 82mm x 98 mm excluding wiring space from the screw connectors The total thickness is appro
54. n 2 x 5 0 1 boxed header The pins and signals for the connector are detailed in Table 3 5 below Pin number Signal I O Comment N C N C TX Data O RS 232 Data transmitted from ModIO N C RX Data I RS 232 Data Received by ModIO N C N C N C GND Power Supply GND N C BR WwW E 0 Table 3 5 RS 232 Interface Connector 3 9 3 RS 485 interface The RS 485 interface should be used if connections of longer than 3 metres are required between the ModIO and the computer or if it is to be operated in an electrically noisy environment e g with a plasma cutter RS 485 allows more than one ModIO on the bus i e with different slave addresses although this is not at present supported by Mach3 RS 485 can be used with two or four wire connexions Although both are supported by ModIO it is strongly advised not to use the 2 wire option with Mach3 The reason for this is that Windows is not reliable in generating a signal from a Com port to define the direction of information transfer With 4 wire this is unnecessary as one pair is transmit and the other pair is receive The RS 485 signals are connected via pins 1 to 4 on J10 or J12 The PC end of the connexion will require an RS 232 to RS 485 converter These are available as standard stock items from electronics and computer suppliers The RS 485 mode has various ju
55. n exhausted Encoder 1 shares pins 14 and 15 with Discrete inputs DIn 6 and DIn 7 Register 1156 TickCtr give the time in ticks since an MPG register was read This is used by Mach3 to calculate the speed of rotation of the MPGs 6 4 1 2 Register Use Summary Address Name Bit7 15 Bit614 Bit5 13 Bit6 12 Bit3 11 Bit2 10 Bit1 9 Bit0 8 106 lt 15 8 gt CONFIG2 z S 106 gt 7 0 lt CONFIG2 DSOFF PEROFF KBOFF UHSE2 UHSE1 UENC2 UNCI 1150 lt 15 8 gt MPG1 B15 B14 B13 B12 B11 B10 B9 B8 1150 lt 7 0 gt MPG1 B7 B6 B5 B4 B3 B2 B1 BO 1155 lt 15 8 gt MPG2 B15 B14 B13 B12 B11 B10 B9 B8 1155 lt 7 0 gt MPG2 B7 B6 B5 B4 B3 B2 B1 BO 1156 lt 15 8 gt TickCtr B15 B14 B13 B12 B11 B10 B9 B8 1156 lt 7 0 gt TickCtr B7 B6 B5 B4 B3 B2 B1 BO Table 6 9 Registers associated with MPG Interface Copyright 2006 Homann Designs Revision 0 92 ModlIO M100 Modbus Interface Unit Users Guide 6 4 2 1151 DIN Discrete Input Register R W X R W X R W X R W X R W X R W X R W X R W X DIN7 DIN6 DINS DIN4 DIN3 DIN2 DIN1 DINO Bit 7 Bit 0 R W 0 R W 0 R W 0 R W 0 R W 0 R W 0 R W 0 R W 0 Bit 15 Bit 8 Bit 15 8 Unimplemented Bit 7 DIN7 Discrete Input 7 J10 12 Pin 15 1 Input is Active OV 0 Input is Inactive 5V Bit 6 DIN6 Discrete Input 6 J10 12 Pin 14 1 Input is Active
56. nals 12 to 9 can be arranged to scan 4 possible columns of contacts e g a 4 4 switch matrix DIn pins 3 0 110 terminals 10 to 7 sense the signal rows 0x8000 0x0008 8 X 9 10 11 J1 Row 3 X DOut 10 9 8 0x1000 0x0001 Row 0 x x x x Col 3 Col 2 Coll Col 0 Diodes can be omitted if only one switch closed at a time Figure 6 4 Connections for Keyboard matrix This mode is enabled by bit 5 of CONFIG2 register 106 When enabled these 4 outputs and 4 inputs are automatically disabled in DOUT register 1040 and DIN register 1151 With a suitable circuit with diodes in series with each switch the ModIO can sense any simultaneous combination of switch closures so this feature can be used to encode 16 switches for any function not just a keypad If one switch closure at a time is all that is expected and you do not mind spurious results if several are pressed then the diodes can be omitted Address Name Bit7 15 Bit614 Bit5 13 Bit6 12 Bit3 11 0 Bit1 9 Bit0 8 106 lt 15 8 gt CONFIG2 106 lt 7 0 gt CONFIG2 DSOF PEROFF KBOFF UHSE2 UHSE1 UENC2 UNC F 1058 lt 15 8 gt Keyboard C3R3 C3R2 C3R1 C3RO C2R3 C2R2 C2R1 C2RO 1058 lt 7 0 gt Keyboard CIR C1R2 CIRI 0180 COR3 COR2 CORI CORO Table 6 15 Register associated with Scanned Inputs Key CxRy e g C1R2 means bit is set to 1 if switch in Column x R
57. ng external indicators 5 1 2 Relay 4 5 to 24 volt DC External relays can be controlled Supply for VOut directly provided they draw no more than the rated 500mA sink current 200mA for Dout7 of the output stages Gnd Freewheeling diodes not needed They are 0 Catching diodes are built in to the Vong Nou ModIO but it does not matter if they J 2 are duplicated at the relay terminal or other outputs Indeed this would be a good thing if TE long connecting leads are required to the relay panel eee be removed Note that the ON voltage on the DOut terminals is about 0 6 to 0 8 volts Thus Figure 5 2 Interfacing relays if you attempt operation from a 5 volt supply the relay must be specified to pull in at lt 4 2 volts 5 1 3 Logic gate e g on VFD invertor Warning Check that the logic ground on any external device is isolated from mains Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide It is very important not to exceed the permitted hi input voltage on the logic in the external device Supply This is typically a little over the for VOut Vcc supply voltage of the logic 5 6 volts with TTL In practice this means that the Sto 24 volt DC Gnd Vec supply to external logic must be common to VOut Otherwise logic or indicator LEDs will be destroyed ModIO VOut should be from vend VOut the same suppl
58. onfiguration selected to the ModIO flash RESET MODIO This button is equivalent to pressing the reset button on the ModIO board It puts a new configuration into use It is particularly convenient when the ModIO is in an enclosure on the machine Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 4 4 Configuring Inputs amp Outputs No special action is required Inputs Din 0 to Din 7 appear as Mach input pins 0 to 7 on Port 0 Outputs DOut 0 to DOut 7 are controlled by output pins 0 to 7 on Port 0 4 5 Configuring MPGs It is convenient to use Port 0 pins 6 7 or Port 0 pins 4 5 on the Config gt Ports and Pins Encoders MPGs tab to record the connections although the MPG mechanism does not involve pulse counting by Mach is done in the ModIO Ensure that the MPGs are configured within the ModIO figure 4 3 Check the MPG 1 and if required MPG 2 boxes on the Modbus Status and Control dialog figure 4 2 Use the Cal button on the jogging flyout in Mach3 to tune the MPGs Unless a fixed step per detent click is important to you you should find that Velocity mode is the most responsive way of working 4 6 Configuring the DigiSpeed spindle control The ModIO has a custom interface to the Homann Designs DigiSpeed This device connects in place of the potentiometer on VED x an
59. open collector outputs on MPGs and the GNDZ like Each input is provided with a LED indicating when the input is active f Figure 3 5 Discrete Input Schematic If the input is being connected to a switching device other than a passive switch the voltage from the device should not exceed 5 volts DC or the inputs will be damaged When state of a Discrete input is accessed by the DIN input register the register contains a bit for each discrete input The bit is set 17 when the input is active 1 6 tied to lt 0 8 volts and LED is illuminated The ModIO may be configured to disable the discrete inputs and outputs That said it would be unusual to have a need to do so To disable the discretes set bit UDIS CONFIG lt 2 gt to 0 Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 3 11 Discrete Outputs The ModIO provides 8 Discrete outputs accessed via the Discrete Output Register DOUT the Digispeed feature and the scanned keyboard The outputs operates as Open Collector That is the output is pulled near to ground when active Devices that are to be controlled need to be connected between the VOut terminal and a particular DOut terminal The outputs 0 to 6 use the ULN2003A transistor output driver chip This driver contains an integral free wheeling or catch diode allowing inductive loads such as relay coils to be controlled The ULN2003A is rated for 5
60. ow y e g Column 1 Row 2 is closed Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 7 Firmware programming The processor on the ModIO has flash memory in it which stores the firmware This can be re flashed from a PC using the RS 232 serial interface This is useful for implementing upgrades to the firmware in the field This process can only be performed after inserting a jumper JP1 so cannot be performed accidentally by a user If you are encountering difficulties with a ModIO then re flashing should only be attempted as a last resort and if you know that the newer version of the firmware that you are installing corrects the sort of symptoms that you have seen If you have a hardware or communications fault the re flashing will potentially fail leaving you with an erased PIC and diagnosis will be even harder than with a partly working system 7 1 Preparation Insert a jumper on the pins of the boot jumper See highlight in Figure 7 1 Reset the ModIO It will the be running a built in boot loader awaiting commands from a utility in the PC Run the program 2161809 6 This will display a screen like figure 7 2 Click Select and right click on the baud rate control Select 57600 as shown in figure 7 3 15 x Not connected gt COM1 96 v 0 a W II 19200 Figure 7 2 Programming utility Figure 7
61. per See LCD Section Default JP12 Legacy was Default 2 Pin 0 17 Jumper Leave open Configuration JP13 DigiSpeed enable 3 Pin 0 1 Jumper See DigiSpeed interface Table 3 4 Jumper Summary 3 5 Power Supply Power is connected to the ModIO via a 2 1mm Co axial Power Jack J8 or from Pins 17 and 18 on the I O Connector strip J10 The power supply can accept AC or DC power and it does not Copyright 2006 Homann Designs Revision 0 92 ModIO M100 Modbus Interface Unit Users Guide Page 17 matter whether the connector pin is positive or negative although it is usual for the pin to be the positive pole with a DC supply The input voltage should be in the range 8 to 24 volts DC or 6 to 18 volts RMS AC Internally the ModIO conditions this raw power supply by a full wave bridge rectifier feeding into a 500mA linear voltage regulator The heat dissipation of this regulator can cause excessive temperature rise in a small enclosure or when input voltages are at the higher end of the range The internal supply presents 5volts DC and or the unregulated but rectified raw input to various output terminal Sufficient power is available for potentiometers the LCD backlight a few low power LEDs or relays etc but if industrial MPGs or other higher powered devices are to be used then you need to provide your own supply for them with its ground commoned to the ModIO ground 3 6 Reset Switch A small push button is moun
62. pindle Use Step Dir as well CW D are 1 and 2 Enabled Reg 64 84 127 Ccw I TM e The 8 ModIO Discrete Outputs are named l Figure 2 10 Coolant is ModIO DOut0 to DOut left to right if the connector is at Output 6 the bottom as you view the board and for example DOut 6 is what Mach3 thinks is Port 0 Pin 6 And finally e The actual outputs are connected to numbered terminals plugged onto pins on the ModIO So for example the signal DOut 6 is on terminal 16 sometimes called pin 16 These numbers are defined in Table 3 1 It seems complicated but unfortunately necessary because of the power of the system Next you can move on to see how a switch input can be used Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 2 4 Sensing a switch closure Switch off the ModIO power and connect a normally open switch between terminals 5 and 8 on the Input side of the ModIO These terminals are Ground and input DIn 1 respectively Note Take care not to do this on the output side by mistake Switch on the ModIO power When you press the switch the second light from the left if power jack is on right hand edge of board should light If it is on and goes off when switch pressed the you have a normally closed switch by mistake The connections are shown in figure 2 11 Now go to Config gt Ports and Pins Input Signals tab and define input 3 say to be ve
63. ported by Mach3 4 11 Testing ModlO from Mach3 It is possible to read and write individual registers of the ModIO using the Test dialog This is ModBus Serial Control Monitor r Comm Port Port Num fi Baud Rate 57600 m Test Slave oe Start fi 00 Num Regs i C Input Reaister s d gt Holding Register s Mo Discrete Input s Write Report Slave ID Read Excp Stat Access Format Hex Decimal C Coilfs Status No error Data Figure 4 5 The Test dialog displayed by the Test ModBus button on the ModBus Status and Control The dialog is shown in figure 4 5 4 11 1 Opening the Modi for test The first operations must be to set the communications parameters if these are wrong set the ModIO Slave Address typically 6 and click the Open button The Status should read No Error 4 11 2 Reading registers To read one of more ModIO registers enter the start address and number of registers and click Read If an attempt is made to read a non existent register then a Timeout Error will be reported Figure 4 4 shows the Config registers of a typical system Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 4 11 3 Writing a register Data can be written to any register by putting its address and a Num Regs of 1 in the control and typing a new hex value in the list box and clicking Write This is illustrated in figure 4
64. porting the Modbus RS 232 or RS 485 standards In this manual we will use the Mach3 CNC controller when we need to illustrate the Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide master side of the Modbus interface A demonstration of Mach3 can be downloaded from http www artsoft ca should you not already be using it and want to run the setup procedures described in the manual Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 2 Quick Start Guide This section is intended to allow you to set up your new ModIO with a single switch and to use Mach3 to read its state and to control one of the output LEDs of the ModIO Initially you should use the RS 232 interface even though you may eventually want to use RS 485 When you have successfully done this you will have experience which will help you understand the information in subsequent chapters We cannot too strongly advise you to follow these simple tests if you have not used a ModIO before Its neat appearance belies a large number of configurable facilities In addition you must ensure that the software in the PC the master and the ModIO the slave are compatibly configured The serial communications cannot be simply diagnosed with a multi meter or logic probe in the way that the connections between parallel port and breakout board can If you do encounter any difficu
65. put 0 J1 2 Pin 9 DOut0 Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 6 3 2 2 1 Output is Active OV 0 Output is Inactive VOut Legend R Readable Bit 1 bit set W Writable Bit 0 bit cleared U Unimplemented A bit Unknown Discrete Output Safety Charge Pump The ModIO provides a Safety Charge Pump facility For Discrete Outputs this facility can be enabled on an individual output basis When enabled the output will be disabled if the ModIO unit fails to receive a Modbus Request within a user selected timeout period See the section on the Safety Charge Pump register 104 for details on using this facility Note Ifa discrete is disabled by the Safety Charge Pump it will not be automatically re enabled once Modbus communication recommences The discrete output must be re activated to turn it back on 6 3 2 3 Register Use Summary Address Name Bit7 15 Bit614 Bit5 13 Bit6 12 Bit3 11 Bit2 10 Bitl 9 8 101 lt 15 8 gt CONFIG 101 lt 7 0 gt CONFIG DBEL PDL2 PDLI PDLO UPMP UDIS UANA ULCD 103 lt 15 8 gt FLASH 103 lt 7 0 gt FLASH FLD6 FLDS FLD4 FLD3 22 FDI FLDO 1040 lt 15 8 gt DOUT 1040 lt 7 0 gt DOUT DOUT7 DOUT6 DOUTS DOUT4 DOUT3 DOUT2 DOUT
66. r any errors in transmission etc Thus the user just has to put data in Output and the LCD buffers and in due course it will go to the ModBus device Data retrieved by the user from Input is the latest version of information from the device The first 64 words of Input and Output are mapped into the port 0 input pins and port 0 output pins respectively Thus anything that activates or deactivates a pin e g turning on coolant can change the data in a ModBus device and data from the device can be treated as a limit switch OEM trigger or virtually anything else that can come in on an input pin The second 64 words of Input and Output have to be accessed from VB Script code e g in a macro or on a button This will very often be done in a Macropump macro This is code run rather like the AutoPoller periodically The difference is that the autopoller does standard things but you write your own MacroPump There are endless possibilities for ModBus devices indeed with a PLC programmable logic controller the system designer actually writes code to run in the device The ModIO is not user programmable so Mach3 knows what it does and this makes ModIO configuration much simpler than general ModBus configuration This manual concentrates of the ModIO case 4 2 Configuring Mach communications for a ModlO In order to use a ModBus device you J Max UL Mode enabled must check Use Modbus InputOutput o Eer EE support on the Config gt Ports and P
67. r registered service marks of their respective owners and should be treated as such Acknowledgements To get a product like the ModIO to the state that it is now takes an immense effort This would not be possible without the help of the following people and others who have helped by beta testing the early versions Andy Wander Andy has taken it upon himself to provide front line support for the ModIO usually being the first to address questions and problems as they appear on the Yahoo ModIO and Mach User Groups Art Fenerty Art has worked tirelessly providing a ModIO interface into Mach3 He is always open and responsive to new suggestions and possibilities Olivier Adler Olivier convinced us that ModBus was the way to go for a reliable serial communications protocol Additionally he conducted the ModIO RS 485 interface testing identified a number of required safety features and has always provided valuable feedback John Prentice John has transformed this document from its incomplete draft state into a polished manual Additionally behind the scenes John has been a sounding board and a great support during the development of the ModIO Steve Blackmore Steve has always provided sound advice and feedback on various aspects of the ModIO development Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide Table of Contents ere e E 5 E DE e 5 EE 5 2 Quick Start
68. ring A TERE rE ERES 27 4 6 Configuring the 1218152666 spindle contra 27 4 7 Usmeandlog A E E Era r ENA 28 dS Heer 30 e Scanned keyboard s ssseresssoeseessisenii series esae naea E EES ENAS 30 4 10 Freguency measurements eebe 31 4 11 Testing ModIO from Mach3 accsacczencessastcesdescadsbsdatteewtenecasesaetiasesedsedstheanseastaasanveieaasanvtades 31 4 11 1 Opening th addenda 31 e Ea S EREEREER teeta 31 E Oe 32 Copyright 2006 Homann Designs Revision 0 92 ModlIO M100 Modbus Interface Unit Users Guide Page 4 5 Interfacing some typical devices to ModIO eases 33 5 1 ET 33 Ext rnal EE EE 33 SE Relay e N E se ewe cased epee 33 5 1 3 Logic gate e g on VFD invertor E 33 5 2 34 5 2 1 Push switches galvanic COMACL jisicasccesacaiaesivessuninssiweesdvasseateceiancsdvabunsenvacaserdvareeases 34 5 2 2 From logic gate outputs 34 e 2 EE 35 5 2 4 Rotary 35 5 2 5 Rotary switches ee EE 35 6 Register EE 36 Oil ROM Register leegent 37 G2 Configuratiot Pep BIOCK segs csaccrascuaaeccuasnces ana scossi coataneuetasdansavanpeapeuanauanavasenttaveaiuane 37 6 2 1 100 ADDRHI Modbus Unit ID address high nbble ee eeeeeereeeeeeeeeeeee 39 6 2 2 101 CONFIG Configuration control register eee eesseceeeeeeeeeeeeeenneeeeeeeeeeeeee 40 6 2 3 102 COMMO UART Configuration Control Register 41 6 2 4 103 FLASH Flash control register eeeeeeseeeecceeeeeeee
69. s may be single or multiple reads and writes The access may be on a register or bit basis The RAM Register Block is split into two sections the input section and the output section The purpose behind this partitioning is for efficiency in reading and writing transactions with the ModIO All reads to the ModIO may be done with a single Modbus Read Holding Registers Function 03 All writes may be done with a single Write Multiple registers 16 Alternatively it is possible to read and write with a single function Read Write Multiple Registers 23 The RAM Register Block Map is defined below in Table 6 4 Address Name 1000 LCD Data Area 1039 1040 DOUT 1041 SPINSPEED 1149 1150 ENCODRI 1151 DIN 1152 ANALOGI1 1153 ANALOG2 1154 ANALOG3 1155 ENCODR2 1156 TICKCTR 1157 PERIOD 1158 KEYBOARD en oO Dec Gm D rale go 750 7 7 6 3 1249 Table 6 4 RAM registers Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 6 3 1 1000 1039 Liquid Crystal Display Controller registers The ModIO provides a character LCD interface The interface is for a 4 x 20 80 Character HD44780 industry standard based character LCD The display is used in two basic modes Diagnostic Mode and Data Mode In Diagnostic mode the information displayed is preformed with the particular display being selected by th
70. s DRO display on ModIO Include this 88 or in Macropump mis Option Explicit Dim Display As String Dim SVal As String Dim iCount As Integer Dim iBase As Integer Dim strMode 6 As String supplementary info must be 5 chars exactly in each Const slave 6 default config Const NoAxesToDisp 4 max lines on ModIO Reduce if no A If GetLED 1 Then strMode 0 inch Else strMode 0 mm If GetOEMLED 16 Then strMode 1 lt m c gt Else strMode 1 coord system If GetOEMLED 83 Then strMode 2 Else strMode 2 NoJog If GetLed 0 Then strMode 3 EStop Else strMode 3 m strMode 4 not on ModIO LCD of course strMode 5 6 Display initially empty string For iCount 0 To NoAxesToDisp 1 SVal Right amp Format GetDro iCount 0 00000 0 00000 8 format the DRO value 8 chars long If iCount gt 3 Then Y Z iBase Asc X Else A B C iBase Asc A 3 End If Display Display amp 6 Chr iBase iCount amp _ SVal amp amp StrMode iCount Next iCount SetMod1IOString slave 0 0 Display Sends string to the ModIO on next poll 4 9 Scanned keyboard Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide This feature is currently not supported by Mach3 4 10 Frequency measurement This feature is currently not sup
71. t 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 100 ADDRHI 101 CONFIG 102 COMMO 103 FLASH 104 PUMP 105 DEBUG 106 CONFIG2 107 250 Table 6 3 Config Block Register Map Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 6 2 1 100 ADDRHI Modbus Unit ID address high nibble U 1 U 1 UI UI R W 1 R W 1 R W 1 R W 1 ADDR3 ADDR2 ADDR1 ADDR Bit 7 e 0 Bit 7 Unimplemented Bit 6 Unimplemented Bit 5 Unimplemented Bit 4 Unimplemented Bit 3 0 ADDR3 ADDRO Modbus Unit ID Address high Nibble These 4 bits are the high 4 bits of the Modbus Unit ID The lower 4 bit of the address are determined by the Address jumpers on the ModIO board Note It will not often be necessary to use these bits to extend the 16 slave addresses available on the rotary switch Legend R Readable Bit W Writable Bit U Unimplemented T bit set 0 bit cleared A bit Unknown Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 6 2 2 101 CONFIG Configuration control register R W 1 R W 1 R W 1 R W 1 R W 1 R W 1 R W 1 R W 1 DBEL PDL2 PDLI1 PDLO UPMP UDIS UANA ULCD Bit 7 Bit 0 Bit 7 DBEL Debug Enable Lo Enable Disable the ModIO Debug interfa
72. tage regulator In this case power can be taken from the VOut terminals but an external supply should not normally be connected to it This internal source is not recommended as the power supply has limited capacity Copyright 2006 Homann Designs Revision 0 92 ModlIO M100 Modbus Interface Unit Users Guide 3 12 Expansion Module Interface The ModIO contains a proprietary expansion bus based on the DC serial communication standard The connector for this bus is a 10 pin 2 x 5 0 1 boxed header The pins and signals for the connector are detailed in Table 3 6 below Pin number Signal I O Comment 1 VOut Power Supply VOut 2 VOut Power Supply VOut 3 5V Power Supply 5V 4 5V Power Supply 5V 5 GND Power Supply GND 6 Clock O Expansion Bus Clock 7 GND Power Supply GND 8 Data I O Expansion Bus Bidirectional Data 9 GND Power Supply GND 10 GND Power Supply GND Table 3 6 J6 Expansion Bus Connector 3 13 DigiSpeed DC Motor Controller Interface The ModIO contains an interface for the Homann DigiSpeed DC Motor controller The connector for this bus is J5 a 6 pin 0 1 open header The pins and signals for the connector are detailed in Table 3 7 below Pin number Signal I O Comment GND Power Supply GND 2 PWM 0 DigiSpeed PWM Signal Shared with DOut 4 3 Enable O DigiSpeed Enable Sign
73. ted on the ModIO printed circuit behind output terminal number J1 7 This will reset the ModIO Note No changes in configuration either by software or jumper take effect until the ModIO is reset by this button or by cycling the power off and on Forgetting to do this is a source of many reports of difficulty in configuring the ModIO 3 7 Configurations and Slave address switch 3 7 1 Configuration parameters The ModIO remembers how it is configured in an area of flash memory in the PIC chip This configuration is updated by writing to registers of the ModIO In a Mach installation this will generally be done using the Config dialog but can also be done by using the test screen and writing into the numbered registers If you have an LCD connected then until you overwrite the screen e g from Mach3 it will display the programmed configuration In part this is in clear language and in part by letters indicating the state of configurations bits A capital version of the letter Figure 3 3 Configuration display on LCD indicates that the feature is Enabled a lowercase letter that it is Disabled The following symbols are displayed in this order Function Enabled Disabled Notes Discrete outputs D d 11 Pins 9 12 amp 14 17 Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide Analog inputs A
74. ure 4 3 Configure ModIO device parameters e g baud rate and forget them then you may find you can no longer communicate with the ModIO to further configure it The default configuration at switch position 0 will get you out of this difficulty Do not forget you need a Reset after choosing it Important note Even experienced users can get confused and think that the ModIO is not working correctly by forgetting these things Some explanation of individual controls in this dialog may be useful Headings The register numbers shown by Mach3 in some of the headings are wrong See chapter 6 for correct details Use Pump The ModIO has built in charge pump logic to disable outputs if it seems to have lost contact with the PC This can cause problems in testing so you may wish to disable the feature The feature if globally enabled can be disabled on an individual output by output basis using bits in register 104 via the Test dialog Pump delay See definition of CONFIG register 101 for the coding of the pump watchdog delay time Use MPGI1 Use MPG2 The screen references to pins 5 6 and pins 7 8 should read Input side terminals 14 15 and Input side terminals 12 13 I e DIn 6 DIn7 and DIn 4 DIn 5 Disable Debug It is vital to leave this checked unless you have specialist debugging experience If enabled then the discrete outputs are Disabled Send config This button writes the c
75. values such as 100 300 etc above are arrived at as follows e The Analog input will read the voltage between 0 and 5V on its input pin and convert it to a digital value from 0 1023 e Since we have a 6 position switch the first position will be 0 the 6th position will be 1023 and each of the positions in between will be 1023 5 greater than the one before it e This gives values rounded to the nearest integer of Position ExactValue 0 205 409 614 818 6 1023 To make the switching as reliable as possible one doesn t want to look for these exact values as they might drift slightly Therefore the decision is based on numbers between the switch positions MW gt Position Mid Value 100 300 N Re Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide 3 511 4 715 5 920 6 1030 So for instance any number less than 100 is taken to be a 0 which equates to Position 1 Any number less than 300 is taken to be Position 2 4 8 LCD Display The characters are written to the LCD two characters per word The easiest way to do this is to setup the entire 80 character string in a VB script array and write it to the LCD The sample below shows code to display the axis DROs the current measurement mode the coordinate system the jog mode and if EStop has occurred Rem Axi
76. ximately 25mm Figure 3 1 shows the position of the mounting holes SIN 85 gt 98 Figure 3 1 Board outline and fixings 3 3 Connectors 3 3 1 Connector summary The ModIO contains a number of connectors by which the board is interfaced to the PC your machine tool and its control panel and a power source The connectors are listed in Table 3 1 below The location of the connectors is indicated in Illustration 3 2 below Connector Description Comment J1 J10 I O Connectors 18 Pin pluggable screw connectors J4 LCD Interface 16 pin 2 x 8 0 1 IDC header J6 Expansion Bus 10 pin 2 x 5 0 1 IDC header J7 RS 232 Interface 10 pin 2 x 5 0 1 IDC header 8 Power Jack 2 1mm Coaxial Power jack J15 DigiSpeed Control 6 Pin Molex 0 1 single row header Table 3 1 Connector Summary 3 3 2 I O Connectors J1 J10 The ModIO contains 2 connectors for interfacing to the machine tool and its control panel Each connector J1 and J10 is made up of 18 pluggable screw terminals Being pluggable they may be lifted off their pins to aid servicing and installation The identification of each terminal is listed below in Table 3 2 and Table 3 3 below Copyright 2006 Homann Designs Revision 0 92 ModlO M100 Modbus Interface Unit Users Guide J10 terminals unplugged Trans amp Recv LEDs RS 232 to bt yw Pwr amp Fault LE Slave select BL L
77. y as the logic Vcc ae sina If the external device allows you DEER to provide this supply then you See can use the ModIO VOut at 5 S r volts of perhaps the unregulated With external power ModlO power IN 8 24 volt supply See JP3 for ay 3g Avalos Gnd details Otherwise you will have to take the supply from the Figure 5 3 Driving external logic external device This may constrain what else you can drive with the ModIO outputs For a slow signal like motor on off or direction of rotation it is often best to include a low power relay to get isolation 5 2 Input devices 5 2 1 Push switches galvanic contact Connect the switch from a DIn terminal ModlO shen Hate to a convenient ground e g J10 pin 5 L DinX 11 or 16 J 10 7 m J10 8 etc No external pullup resistor is required as J10 5 ACIDC power IN one is provided in the ModIO Sraund Gnd Figure 5 4 Interfacing switches 5 2 2 From logic gate outputs Wherever possible use Open Collector output gates in the Extemal device Mod IO external equipment The _ Din See near ModIO contains a suitable gt J10 8 etc pullup resistor T If you have to use totem pole J10 5 ees pears i Ground Gnd outputs i e not open collector gates then you must ensure that the Vcc of the external logic does not exceed the 5 volt Figure 5 5 Interfacing inputs to other logic supply of the ModIO or its Copyright 2006
Download Pdf Manuals
Related Search
Related Contents
¿Cómo se clasifican los aceites de motor? Screen Creator 5 Connection with PLC and External Equipment TRANSCOPY FOIL (M1203138 - 2006-06 Overview and User Guide Sistema de eliminación de vello IPL para uso en cuerpo y cara Tripp Lite 3.5mm Mini Stereo to Two RCA Audio Y Splitter Adapter Cable (3.5mm F to 2x RCA M), 6-in. 化学物質に関する簡易モニタリング技術 実証試験結果報告書 Brodit 512396 holder 測温抵抗体入力カード「OPC-PT」 - Fuji Electric GmbH Tote Vision LCD-1513VB 15.1 User's Manual Copyright © All rights reserved.
Failed to retrieve file