Home

MC8043P User`s Manual

image

Contents

1. 34 NOVA electronics MC8043P M35 6 Click Have Disk button and then click Browse button Select the driver folder Driver and then click Next Hardware Update Wizard Select the device driver you want to install for this hardware Select the manufacturer and model of your hardware device and then click Next If you have a disk that contains the driver you want to install click Have Disk Show compatible hardware Model MC8043P Device A This driver is not digitally signed Tell me why driver signing is important Cancel 7 After the updating is successfully completed the following dialog box opens then click Finish Hardware Update Wizard Completing the Hardware Update D Wizard The wizard has finished installing the software for gt MC8043P Device Click Finish to close the wizard 35 NOVA electronics 8 Check the updated driver s version in MC8043P Device Properties Open Driver Version txt file and check the version described in the 1 Driver Version and then check the updated version displayed in the following window Then click Driver Details button MC8043P Device Properties General Driver Details Resources MC8043P M36 MC8043P Device Driver Provider Driver Date Driver Version Digital Signer NOVA electronics 5 30 2005 2 0 0 0 Not digitally signed Driver Details To view details about the driver files Upd
2. Return Value None Example VC Nmc_WriteReg6 No 0x1234 Write data 1234 H into write data register 1 VB Call Nmc_WriteReg6 No amp H1234 Nmc_WriteReg7 Write data into WR7 Write data register 2 vc void Nmc_WriteReg7 int No long wdata VB Sub Nmc_WriteReg7 ByVal No As Long ByVal wdata As Long VB NET Sub Nmc_WriteReg7 ByVal No As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board wdata Data to be written Return Value None Example VC Nmc_WriteReg7 No 0x5678 Write data 5678 H into write data register 2 VB Call Nmc_WriteReg7 No amp H5678 Nmc_ReadRegO Read out data from RRO Main status register vc long Nmc_ReadReg0 int No VB Function Nmc_ReadReg0 ByVal No As Long As Long VB NET Function Nmc_ReadRegO ByVal No As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Return Value The data of RRO Main status register Example VC Data Nmc_ReadReg0 No Read out RRO VB Data Nmc_ReadReg0 No 49 NOVA electronics MC8043P M50 Function Name Function and Content Nmc_ReadReg1 Read out data from RR1 Status register 1 vc long Nmc_ReadReg1 int No int Axis VB Function Nmc_ReadReg1 ByVal No As Long ByVal Axis As Long As Long VB NET Function Nmc_ReadReg1 ByVal No As Integer ByVal Axis As Integer As Integer
3. In home search this input signal is to stop drive pulse in deceleration or immediately from outside Enable Disable and active logical level can be selected in mode setting Each axis has three inputs also can be used as general input These input signals are isolated by photo coupler from internal circuit E Servo Motor Input nINPOS nALARM INPOS in position signal and ALARM signal for servo motor drivers can be input which can also be used as general input signals These input signals are isolated by photo coupler from internal circuit E Encoder Input nNECAP N nECBP N nINOP N This signal inputs A B phase and Z phase signals from an encoder nECAP N nECBP N signals are for an encoder A B phase signal input and count up or down 32 bit real position counter inside MCX314As nINOP N signal is for a Z phase signal input and stops drive pulse in deceleration or immediately In default setting nINOP N signal is connected to nINO input of MCX314As Short circuiting 2 and 3 of the jumper pin JP3 this Z phase input is connected to nIN2 of MCX314As and the user can perform automatic home search function of MCX314As These input signals are isolated by photo coupler from internal circuit and can easily be connected to a differential output line drive E Driving by External Input nEXOP nEXOP This signal externally controls driving in the or direction In fixed pulse driving mode the input signal triggers the falling edge to output s
4. MC8043P M81 3 The structure user defined type in VB used in the interpolation function is defined as follows vc 2 axis BP interpolation typedef struct DATA 2BP USHORT Bplp USHORT Bplm USHORT Bp2p USHORT Bp2m DATA _2BP 3 axis BP interpolation typedef struct DATA 3BP USHORT Bplp USHORT Bplm USHORT Bp2p USHORT Bp2m USHORT Bp3p USHORT Bp3m DATA_3BP 2 axis continuous interpolation typedef struct DATA 2CIP USHORT Command USHORT Speed long EndP1 long EndP2 long Center long Center2 DATA _2CIP 3 axis continuous interpolation typedef struct DATA 3CIP EndP1 EndP2 EndP3 Speed long long long USHORT DATA _3CIP BP1P data BPIM data BP2P data BP2M data BP1P data BP1IM data BP2P data BP2M data BP3P data BP3M data Command number Set one of CMD_IP_2ST CMD_IP_CW CMD_IP_ CCW Speed When changing the speed set 1 8000 When not changing set 0 Finishing point The first axis Finishing point The second axis Circular center point The first axis Circular center point The second axis Note The first or second axis must be specified by WRS Finishing point The first axis Finishing point The second axis Finishing point The third axis Speed When changing the speed set 1 8000 When not changing set 0 Note The first second or third axis must be
5. Nmc_WriteRegSetAxis Nmce_Command Nmc_WriteReg1 Nmc_ReadReg2 Nmc_Jerk Nmc_Pulse_VB Nmc_CompP Nmec_SynceMode Nmc_ReadEp Nmc_3BPExec Nmc_3CIPExec Nmc_Jerk Nmc_Pulse_VB Nmc_CompP Nmc SyncMode Nmc_3CIPExec Nmc_WriteReg7 Nmc_Command_IP Nmc_WriteReg2 Nmc_Acc Nmc_DecP Nmc_CompM Nmc_ReadSpeed Nmc_2BPExec_BG Nmc_ReadRegSetAxis Functions executing data writing into WR6 WR7 Nmc_Acc Nmc_DecP Nmc_CompM Nmc_WriteData Nmc_2CIPExec BG Nmc_ 3CIPExec_BG Functions executing data reading to RR6 RR7 Nmc_WriteReg3 Nmc_Dec Nmc_DecP_VB Nmc_AccOfst Nmc_ReadAccDec Nmc_3BPExec_BG Nmc_2CIPExec BG Nmc_ 3CIPExec_BG Nmc_WriteData Nmc_Dec Nmc_DecP_VB Nmc_AccOfst Nmc_WriteData2 Nmc_StartSpd Nmc_Center Nmce_DJerk Nmc_ Speed Nmece_Lp Nmc_HomeSpd Nmc_ReadSyncBuff Nme_WriteData2 Nmc_StartSpd Nmc_Center Nmce_DJerk Nmc_ReadData Nmc_ Speed Nmce_Lp Nmc_HomeSpd Nmc_ReadLp Nmc_ReadEp Nmc_ReadSpeed Nmc_ReadAccDec Nmc_ReadSyncBuff Nmc_ReadData To perform WR1 WR3 writing RR1 RR2 reading data writing command and data reading command basically use the following Nmc_xxx function WRI1 WR3 writing Nmc_WriteRegl Nmc_WriteReg2 Nmc_WriteReg3 Nmc_WriteRegSetAxis RR1 RR2 reading Nmc_ReadReg1 Nmc_ReadReg2 Nmc_ReadRegSetAxis Data writing command Nmc_ Range Nmc_Jerk Nmc Acc Nmc Dec Nmc StartSpd Nmc_ Speed Nmc_Pulse Nmc_Pulse_VB Nmc_DecP Nmc_DecP_VB N
6. Sample G Form1 frm MC8043P_DLL bas Module bas MC_Sample vbp exe VBSampleG exe VB NET2003 NormallyClose Sample A FormA vb MC8043P_DLL vb Modulel vb VBSample sIn exe VBSampleA exe Sample A FormA vb MC8043P_DLL vb Module1 vb VBSample sIn exe VBSampleA exe Sample C FormC vb MC8043P_DLL vb VBSample sIn exe VBSampleC exe Sample E Form1 vb MC8043P_DLL vb Module1 vb MC_Sample sIn exe VBSampleE exe Sample G Form1 vb MC8043P_DLL vb Modulel vb MC_Sample sln exe VBSampleG exe MC8043P M98 Sample program G MC8043P DLL Declaration definition file for VB6 0 MC8043P Control function sample Project file for VB sample program VB6 0 Executable file Sample program A Normally Close MC8043P DLL Declaration definition file for VB NET 2003 MC8043P Control function sample Solution file for VB sample program VB NET 2003 Executable file Sample program A MC8043P DLL Declaration definition file for VB NET 2003 MC8043P Control function sample Solution file for VB sample program VB NET 2003 Executable file Sample program C MC8043P DLL Declaration definition file for VB NET 2003 Solution file for VB sample program VB NET 2003 Executable file Sample program E MC8043P DLL Declaratio
7. MC8043P M61 Function Name Function and Content Nmc_GetBpSc Read the value of BP interpolation stack counter ve int Nmc_GetBpSc int No VB Function Nmc_GetBpSc ByVal No As Long As Long VB NET Function Nmc_GetBpSc ByVal No As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Return Value The value of the current bit pattern interpolation stack counter Example VC Data Nmc_GetBpSc No Read the value of BP interpolation stack counter VB Data Nmc_GetBpSc No Nmc_WriteRegSetAxis Write data into one specified write register of WR1 WR3 for the specified axis ve void Nmc_WriteRegSetAxis int No int Axis int RegNumber long wdata VB Sub Nmc_WriteRegSetAxis ByVal No As Long ByVal Axis As Long ByVal RegNumber As Long ByVal wdata As Long VB NET Sub Nmc_WriteRegSetAxis ByVal No As Integer ByVal Axis As Integer ByVal RegNumber As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to write data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details RegNumber Write register number to write data Assign MCX314_WR1 for WR1 MCX314_WR2 for WR2 and MCX314_WR3 for WR3 See Footnote 1 wdata Data to be written Return Value None Example Write ALARM Enable 2000 H into WR2 of all axes VC Nmc_WriteRegSetAxis No AXIS_ALL M
8. direction of MCX314As through a differential line drive output AM26C31 or equivalent nP N is the reverse output of nP P and nP N is the reverse output of nP P At resetting positive output nP P nP P becomes low level and reverse output nP N nP N becomes hi level Drive pulse output is set to independent 2 pulse type after resetting however the user can change to 1 pulse 1 direction type in mode setting See chapter 2 9 2 and 4 5 of MCX314As user s manual MCX314As nP P me AS S o nP N AM26C310NS or equivalent nPM DIR a DO Drive Pulse Output Signal Circuit The following is the connection example of a motor driver with a photo coupler input and line receiver input onP P o nP N MC8043P Motor driver XP P O Mis ANN XP N Q K CW D XP P Cht g yw XP N Q A cL ia 4 ED Connection example of a motor driver with a photo coupler input 7 NOVA electronics MC8043P M8 WN y AM26LS32 NNV y Twist Pair Shield AM26LS32 Motor driver Signal GND Line Connection example of a motor driver with a line receiver input Note As shown above when using a line receiver input circuit connect MC8043P and a motor driver with Signal GND line If there is the potential difference between MC8043P and motor driver a malfunction and the distruction of the driver circuit and or the motor diriver circuit may be caused 3 3 General Output Signal nNOUT7 nOUT6 nO
9. Decelerating stop Sudden stop 2 axis linear interpolation 3 axis linear interpolation CW circular interpolation CCW circular interpolation 2 axis bit pattern interpolation 3 axis bit pattern interpolation BP register data writing enabling BP register data writing disabling BP data stack BP data clear Single step interpolation 78 NOVA electronics define CMD_IP_DEC_VALID define CMD_IP_DEC_INVALID define CMD_IP_INTRPT_CLR Other commands define CMD_HOME_EXEC define CMD_DEVCTR_CLR define CMD SYNC_ACTIVE define CMD_NOP 0x3B 0x3C 0x3D 0x62 0x63 0x65 OxOF Interpolation finishing message finishing status Interpolation finishing message define WM_BP_END define WM_CIP_END BP Interpolation m Normal define BP_START define BP_END MC8043P M79 Decelerating enabling Decelerating disabling Interpolation interrupt clear Automatic home search execution Stack counter clear output Synchronous action activation NOP for axis switching WM_USER 1 BP interpolation finishing message WM_USER 2 Continuous interpolation finishing message 0x101 0x 102 m Errors before starting the interpolation define BP_CNT_ERR define BP_ALREADY_EXEC define BPTHREAD ERR define BP_ MALLOC_ERR 0x111 0x112 0x113 0x114 m Errors during the interpolation driving define BP_STOP define BP_USER_STO
10. Input Z axis Driving in direction 3 8 B30 ZEXOP Input Z axis Driving in direction 3 8 B31 UEXOP Input U axis Driving in direction 3 8 B32 UEXOP Input U axis Driving in direction 3 8 B33 GND Internal Circuit GND B34 ZOUT4 Output Z axis General Output 3 3 B35 ZOUT5 Output Z axis General Output 3 3 B36 ZOUT6 Output Z axis General Output 3 3 B37 ZOUT7 Output Z axis General Output 3 3 B38 ZP P Output Z axis Drive Pulse in direction 3 2 B39 ZP N Output Z axis Drive Pulse in direction 3 2 B40 ZP P Output Z axis Drive Pulse in direction 3 2 B41 ZP N Output Z axis Drive Pulse in direction 3 2 B42 GND Internal Circuit GND B43 UOUT4 Output U axis General Output 3 3 B44 UOUT5 Output U axis General Output 3 3 B45 UOUT6 Output U axis General Output 3 3 B46 UOUT7 Output U axis General Output 3 3 B47 UP P Output U axis Drive Pulse in direction 3 2 B48 UP N Output U axis Drive Pulse in direction 3 2 B49 UP P Output U axis Drive Pulse in direction 3 2 B50 UP N Output U axis Drive Pulse in direction 3 2 Note When connecting the cable into the I O connector turn OFF PC first and turn OFF external power DC 24V then connect the cable Otherwise the destruction of the internal circuit may be caused Be careful about the connector direction and not to reverse it 3 2 Drive Pulse Output Signal nP P nP N nP P nP N Drive pulse output signal outputs the drive pulse of
11. The read register numbers RRO RR7 are defined in the MC8043P_DLL h file Concerning RR3 register data reading see the description of ReadRR3 function ReadRR3 Read the value of RR3 will be cleared after reading right after an interrupt event is generated in MC8043P Perform to MC8043P whose board number setting value of rotary switch on the board is 0 Input Parameter WORD Pointer to a variable that receives the X axis RR3 value WORD Pointer to a variable that receives the Y axis RR3 value WORD Pointer to a variable that receives the Z axis RR3 value WORD Pointer to a variable that receives the U axis RR3 value Return Value None lt Example gt WORD Rr3X Rr3Y Rr3Z Rr3U ReadRR3 amp Rr3X amp Rr3Y amp Rr3Z amp Rr3U Note The RR3 value of MC8043P is cleared due to the driver operation just after the interrupt occurs Use this function to check RR3 right after an interrupt generation 90 NOVA electronics MC8043P M91 9 1 4 2 VC When multiple MC8043P boards are used When programming in VC and using multiple MC8043P boards the following function can be used Function Name Function and Content OpenCard_N Start MC8043P Input Parameter int Board number setting value of rotary switch 0 9 on the board 1 void WINAPI Pointer to the user function to be called when an interrupt occurs This pointer must be NULL if the interrupt is not used Return Value HA
12. Then user defined function of the application for interrupt is called Only when user defined function has been set The interrupt that occurs when the value of stack counter changes from 2 to 1 in bit pattern interpolation The interpolation interrupt is cleared in the driver just after the interrupt occurs in MC8043P Then user defined function of the application for interrupt is called Only when user defined function has been set 5 Board number specified by the application The following is an example of open function NO Function Board number specified by the function Board actually activated 1 OpenMC8043P 0 9 The value of rotary switch Specified board OpenCard_N 1 10 The value of rotary switch 1 Specified board OpenCard None specified Board whose setting value of rotary switch is 0 When board number 1 is specified by OpenCard_N function the board whose setting value of rotary switch is 0 opens When board number 10 is specified by OpenCard_N function the board whose setting value of rotary switch is 9 opens 6 Simultaneous access from two applications to one board Do not access like Open simultaneously from two or more applications to one board 7 When modifying the existing MC8041P application to MC8043P application See chapter 9 3 Development Procedure 8 When using both RR3 interrupt and the Interpolation Interrupt When both the interrupt reported by register RR3 and the inter
13. XECBP Q y Wel gH Q XECBN XINOP Q i x EC Z lt XINON Encoder Connection Example with Differential Line Drive Output The connection example of an encoder input signal and the encoder with open collector output is shown as follows VCC 4 Encoder XECAP XECAN XECBP XECBN XI NOP X INON Power Voltage V R Q 5 0 12 820 1 4W 24 2K W Connection Example with Open Collector Output 12 NOVA electronics MC8043P M13 3 8 Driving by External Signal nNEXOP nEXOP The signal externally controls driving in the or direction In fixed pulse driving mode the falling edge of these signals trigger to output specified drive pulse In continuous pulse driving mode drive pulse is output continuously while the input signals are low This function can reduce the load of the host CPU so the user can perform jog feed of each axis speedy External signal for driving can be set in mode setting of MCX314As For details see chapter 2 9 1 and 4 6 of MCX314As user s manual To enable this signal external power supply DC12 24V is needed When the board is powered on the built in integral filter of MCX314As shown below becomes the setting of signal delay time 512 u sec due to the default setting of Windows device driver provided by NOVA electronics This signal delay time can be changed for circumstances of
14. k nP P Previous State Valid Level Direction Signal First drive pulse is output within a maximum of 650nSEC after writing of drive command When drive output pulse is 1 pulse type a direction signal nP P becomes valid level within a maximum of 275nSEC after writing of drive command And first drive pulse is output after 375nSEC when the direction signal becomes valid level 6 3 Interpolation 1 OW Writing of interpolation drive command nP P D Second Pulse OESP 2 Z p nP P Invalid Valid Level l nva ig Valid Level s e Direction Signal During interpolation driving first drive pulse is output within a maximum of 775nSEC after writing of interpolation drive command When drive output pulse is 1 pulse type a direction signal nP P becomes valid level while each drive pulse is Hi level and between before and after the 125nSEC only When the drive pulse is positive logical level 17 NOVA electronics MC8043P M18 6 4 Input Pulse Timing m Encoder 2 phase Pulse Input Count Up Count Down nECAP KY ooo EGAN a GECBR Sw ee AN ep Se nECBN s Js fe T l eee OLD lO LO Ol DJ EC A EC B phase difference time 200nSEC min E Up Down Pulse Input nECAP nECAN nECBP nECBN UP DOWN pulse width 130nSEC min UP DOWN between the pulses 260nSEC min UP DOWN pulse cycle 260nSEC m
15. 2 axis continuous interpolation The number of data is 2 X Y axes if Ret CIPLEND AfxMessageBox Successful completion Return value is correct Dim Data2Cip 1 As DATA_2CIP 2 axis continuous interpolation data 2 axis continuous interpolation data setting Data2Cip 0 Command CMD_IP_2ST 2 axis linear interpolation Data2Cip 0 EndP1 4500 Data2Cip 0 EndP2 0 Data2Cip 1 Command CMD_IP_CCW CCW circular interpolation Data2Cip 1 EndP1 1500 Data2Cip 1 EndP2 1500 Data2Cip 1 Center1 0 Data2Cip 1 Center2 1500 Call Nmc_WriteReg5 No amp H4 Axis assignment for interpolation Master axis X Second axis Y Ret Nmc_2CIPExec No Data2Cip 0 2 amp H4 False False 2 axis continuous interpolation The number of data is 2 X Y axes If Ret CIP_END Then Return value is correct Call MsgBox Successful completion End If 70 NOVA electronics MC8043P M71 Function Name Function and Content Nmc_3CIPExec Execute 3 axis continuous interpolation using the specified interpolation data This function returns control after the interpolation process has finished That is the control will not return unless the interpolation process ends so it is recommended to create a thread in the application and call from the thread vc DWORD Nmc_3CIPExec int No DATA_3CIP pData3Cip int DataCnt int IpAxis BOOL SpdChgFlg FALSE BOOL ContinueFlg FALSE VB Function Nmc_
16. 3 1 VC 6 0 Project Settings For VC NET 2003 users go to Project Properties Linker Input and then designate MC8043P lib to Additional Dependencies See Fig 9 3 2 VC NET 2003 Project Properties 4 Program by using functions of 9 1 3 API MC8043P Driver Function Project Settings Settings For wina2 Release 7 General Debug C C Link Resourci GEE VCS ample Category General y Reset Output file name Release V CSample4 exe Object library modules GEEA kernel32 lib user32 lib gdi32 lib winspool lib c I Generate debug info Ignore all default libraries Link incrementally l Generate mapfile I Enable profiling Project Options MC8043P LIB kernel32 lib user32 lib gdi32 lib winspool lib comdlg32 lib advapi32 lib shell32 lib ole32 lib oleaut32 lib uuid lib odbc32 lib odbecp32 lib Cancel Fig 9 3 1 VC 6 0 Project Settings xi Configuration Jactive Release Platform ctivetwin32 7 Configuration Manager amp Configuration Properties Additional Dependencies MC8043P LIB General Ignore All Default Libraries No Debugging Ignore Specific Library Q cict Module Definition File 2 Linker Add Module to Assembly General Embed Managed Resource File Force Symbol References Debugging Delay Loaded DLLs System Optimization Embedded IDL Advanced Command Line Resources Browse Information Build Events Cust
17. 400 Set 400 to interpolation finish point Z axis Nmc_DecP Set manual decelerating point VC only vc void Nmc_DecP int No int Axis ULONG wdata VB cannot be used VB NET cannot be used Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VC Nmc_DecP No AXIS_U 30000 Set 30000 to manual decelerating point U axis Nmc_DecP_VB Set manual decelerating point VB only vc cannot be used VB Sub Nmc_DecP_VB ByVal No As Long ByVal Axis As Long ByVal wdata As Double VB NET Sub Nmc_DecP_VB ByVal No As Integer ByVal Axis As Integer ByVal wdata As Double Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VB Call Nmc_DecP_VB No AXIS_X 40000 Set 40000 to manual decelerating point X axis 54 NOVA electronics MC8043P M55 Function Name Function and Content Nmc_Center Set circular center point vc void Nmc_Center int No int Axis long wdata VB Sub Nmc_Center ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_Center ByVal No As Integer ByVal Axis As Integer By
18. AfxMessageBox Interpolation has been successfully completed Return value is correct Interpolation has finished return 0 Dim Data2Cip 1 As DATA_2CIP 2 axis continuous interpolation data 2 axis continuous interpolation data setting Data2Cip 0 Command CMD_IP_2ST 2 axis linear interpolation Data2Cip 0 EndP1 4500 Data2Cip 0 EndP2 0 Data2Cip 1 Command CMD_IP_CCW CCW circular interpolation Data2Cip 1 EndP1 1500 Data2Cip 1 EndP2 1500 Data2Cip 1 Center1 0 Data2Cip 1 Center2 1500 Call Nmc_WriteReg5 No amp H4 Axis assignment for interpolation Master axis X Second axis Y 2 axis continuous interpolation The number of data is 2 X Y axes Ret Nmc_2CIPExec_BG hWnd No Data2Cip 0 2 amp H4 False False If Ret CIP_START Then _ Return value is correct Interpolation has started Call MsgBox Interpolation has started End If End Sub In VB the following message received function is applied WM_CIP_END message received function Function WindowProc ByVal hw As Long ByVal uMsg As Long ByVal wParam As Long ByVal IParam As Long As Long If uMsg WM_CIP_END Then _ Continuous interpolation finishing message If Param CIP_END Then Return value is correct Interpolation has finished Call MsgBox Interpolation has been successfully completed End If End If WindowProc CallWindowProc glpPrevWndProc hw uMsg wParam IParam End Function In VB NET the following message received
19. CloseMC8043P or CloseAlIMC8043P while the interrupt user defined function the function designated by SetEventMC8043P is running Before executing the close handling make sure that the interrupt user defined function is finished m When handling the interrupt by VC 1 The user can set user function handling an interrupt by using SetEventMC8043P function And can specify one argument When multiple boards are used the example is as follows When the board number is 0 Nmc_WriteReg1 0 AXIS_ALL 0x8000 _ Generate an interrupt at the stop All axes SetEventMC8043P 0 LPTHREAD_START_ROUTINE MC8043P_EventProc0 NULL II Assign the address of function and the argument When the board number is 1 Nmc_WriteReg1 1 AXIS_ALL 0x8000 II Generate an interrupt at the stop All axes SetEventMC8043P 1 LPTHREAD_START_ROUTINE MC8043P_EventProc1 IpParameter Assign the address of function and the argument 2 Read the interrupt factor of each board in user function handling an interrupt To read the interrupt factor of RR3 use ReadEventMC8043P User function handling the interrupt of the board number 0 void MC8043P_EventProcO void long Rr3X Rr3Y Rr3Z Rr3U ReadEventMC8043P 0 amp Rr3X amp Rr3Y amp Rr3Z amp Rr3U User function handling the interrupt of the board number 1 void MC8043P_EventProc1 LPVOID IpParameter long Rr3X Rr3Y Rr3Z Rr3U ReadEventMC8043P 1
20. Corporation This user s manual supports Japanese User s Manual Version 2006 08 30 NOVA electronics MC8043P Mii POUTINE a a suse Beesedateoce 1 1 1 1 2 1 3 1 4 MGX314AS Functional REStUICHON ss iciiiscidesiieetdidsntadaisaassactccecesdegtacgeate sbeacdeanssddeneesseaniaegedietadetateeatens 2 Difference from MCS80411P x cca EE MN MAMMNMNEAIATE A 2 PGI Bus IMENICE EREET OO 2 Each AxiS l O IMtG acess decececeseca cit Eere nena EEEE ews EEE EEE EEEE EEE nian ede aan EEE EEEE EEE EEPE EEE EEPE EEE KEERA NARR EEH 3 2 1 0 Address Setting and Register c cccceeees 4 SAW O SIQMAlS irp caine aass 5 SE W O Connector ariannin n a a E E E OAO OE OEO O RRS 5 3 2 Drive Pulse Output Signal nP P NP N nP P NP N 0 2 cceeceeeeeeeeeeeeeeceeeeeeeeeeeeeeeeaaeeeeeeeeeeesaas 7 3 3 General Output Signal NOUT7 NOUT6 NOUT5 NOUTA cece eee eee ee ceeeeeeeeeeeeeeeaeaeeeeeeeees 8 3 4 Over Run Limit Input Signal NLMT NLMT rr eee eeeeeeeeeeeeeeeeeeeeenenenees 9 3 5 Decelerating Stop Instant Stop Input Signal MIN1 NIN2 MINS neee 10 3 6 Input Signal for Servo Motor nINPOS NALARM rr eeeeeeteeetenieeteeeties 10 3 7 Encoder Input Signal nECAP nECAN nECBP nECBN nINOP nINON 0 eseeeeeeeeeees 11 3 8 Driving by External Signal NEXOP NEXOP isecen er reeeeeeeteneeeeteneeeeentees 13 3 9 Emergency Stop Input Signal EMG rr iniiiiiniitininenieniies 13 3 10 External
21. Function If the user cannot link to MC8043P dll during debugging copy MC8043P dll to the current folder Note The user cannot use interrupt of MC8043P in VB applications HM When modifying the existing MC8041P application to MC8043P application Note The MC8043P s driver supports Windows 2000 or Windows XP And it does not support Windows 95 98 or Windows NT 1 Add MC8043P_DLL vb in Lib VB NET2003 folder to your project to development 2 Delete the Declare statement for MC8041P DLL function declared in the existing MC8041P application source Examples of the Declare statement for MC8041P DLL to be deleted Declare Function OpenCard Lib mc8041p dll ByVal isr As Integer As Integer Declare Function CloseCard Lib mc8041p dll As Integer 3 The user can use functions of 9 1 4 5 9 1 4 6 VB NET 2003 in 9 1 4 API Supporting Function used by MC8041P Driver To be on the safe side check the data type of the argument and the return value for API function For the board number refer to the chapter of above API However VB does not support the interrupt so if the interrupt handling is already included the user must change it 4 Create exe file When the file is successfully compiled the user can run the application on the machine properly installed MC8043P driver If the user cannot link to MC8043P dll during debugging copy MC8043P dll to the current folder Note The user cannot use interrupt of MC8043P in VB ap
22. IP data Dim Bplm As Short BPIM data Dim Bp2p As Short BP2P data Dim Bp2m As Short BP2M data End Structure 3 axis BP interpolation Structure DATA_3BP Dim Bplp As Short BP1P data Dim Bplm As Short BPIM data Dim Bp2p As Short BP2P data Dim Bp2m As Short BP2M data Dim Bp3p As Short BP3P data Dim Bp3m As Short BP3M data End Structure 2 axis continuous interpolation Structure DATA_2CIP Dim Cmd As Short Command number Set one of CMD_IP_2ST CMD_IP_CW CMD_IP_CCW Dim Speed As Short Speed When changing the speed set 1 8000 When not changing set 0 Dim EndP1 As Integer Finishing point The first axis Dim EndP2 As Integer Finishing point The second axis Dim Center As Integer Circular center point The first axis Dim Center2 As Integer Circular center point The second axis End Structure Note The first or second axis must be specified by WRS 3 axis continuous interpolation Structure DATA_3CIP Dim EndP1 As Integer Finishing point The first axis Dim EndP2 As Integer Finishing point The second axis Dim EndP3 As Integer Finishing point The third axis Dim Speed As Short Speed When changing the speed set 1 8000 When not changing set 0 End Structure Note The first second or third axis must be specified by WRS 83 NOVA electronics MC8043P M84 4 The interpolation axis IpAxis specified by the interpolation function is as follows Set the axis data to the low
23. Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to read data Assign AXIS_X for X axis AXIS_Y for Y axis AXIS_Z for Z axis AXIS_U for U axis Return Value The data of RR1 Status register 1 Example VC Data Nmc_ReadReg1 No AXIS_X Read out RR1 X axis VB Data Nmc_ReadReg1 No AXIS_X Nmc_ReadReg2 Read out data from RR2 Status register 2 vc long Nmc_ReadReg2 int No int Axis VB Function Nmc_ReadReg2 ByVal No As Long ByVal Axis As Long As Long VB NET Function Nmc_ReadReg2 ByVal No As Integer ByVal Axis As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to read data Assign AXIS_X for X axis AXIS_Y for Y axis AXIS_Z for Z axis AXIS_U for U axis Return Value The data of RR2 Status register 2 Example VC Data Nmc_ReadReg2 No AXIS_Y Read out RR2 Y axis VB Data Nmc_ReadReg2 No AXIS_Y Nmc_ReadReg4 Read out data from RR4 Input register 1 vc long Nmc_ReadReg4 int No VB Function Nmc_ReadReg4 ByVal No As Long As Long VB NET Function Nmc_ReadReg4 ByVal No As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Return Value The data of RR4 Input register 1 Example VC Data Nmc_ReadReg4 No Read out RR4 VB Data Nmc_ReadReg4 No Nmc_ReadReg5 Read out data from RR5 Input register 2
24. NET Page Nmc_WriteRegSetAxis Axis Assignment Write Register Writing WR1 3 O O O 61 Nmc_ReadRegSetAxis Axis Assignment Read Register Reading RR1 2 O O O Nmc_WriteData Data Writing Parameter O O O 62 Nmc_WriteData2 Data Writing Extension Mode Synchronous Action O O O Mode Nmc_ReadData Data Reading O O O Interpolation Execution Function Name Description VC VB VB NET Page Nmc_2BPExec 2 axis BP Interpolation Execution O O O 63 Nmc_3BPExec 3 axis BP Interpolation Execution O O O 64 Nmc_2BPExec_BG 2 axis BP Interpolation Execution run in the O O O 65 background Nmc_3BPExec_BG 3 axis BP Interpolation Execution run in the O O O 67 background Nmc_2CIPExec 2 axis Continuous Interpolation Execution O O O 69 Nmc_3CIPExec 3 axis Continuous Interpolation Execution O O O 71 Nmc_2CIPExec_BG 2 axis Continuous Interpolation Execution run in O O O 73 the background Nmc_3CIPExec_BG 3 axis Continuous Interpolation Execution run in O O O 75 the background Nmc_IPStop Stop the Interpolation Execution O O O 77 41 NOVA electronics 9 1 3 2 Function Specifications For VC users See VC and VC For VC NET users See VC and VC For VB users See VB and VB For VB NET users See VB NET and VB And others are common to each language MC8043P M42 Function Name Function and Content OpenMC8043P Start MC8043P vc BOOL OpenMC8043P int No VB Function OpenMC8043P ByVal No As Long As Long VB NET F
25. No AXIS_X 50000 Nmc_AccOfst Set acceleration counter offsetting vc void Nmc_AccOfst int No int Axis long wdata VB Sub Nmc_AccOfst ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_AccOfst ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VC Nmc_AccOfst No AXIS_Y 20 Set 20 to acceleration counter offsetting Y axis VB Call Nmc_AccOfst No AXIS_Y 20 56 NOVA electronics MC8043P M57 Function Name Function and Content Nmc_DJerk Set deceleration increasing rate vc void Nmc_DJerk int No int Axis long wdata VB Sub Nmc_DJerk ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_DJerk ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VC Nmc_DJerk No AXIS_Z 1000 Set 1000 to deceleration increasing rate Z axis VB Call Nmc_DJerk No AXIS_Z 1000 Nmc_HomeSpd
26. No MCX314_WRO 0x0110 Read logical position counter of X axis to RR6 RR7 d6 InpMC8043P No MCX314_RR6 Read from RR6 d7 InpMC8043P No MCX314_RR7 Read from RR7 In this case if Nmc_xxx function to read data to RR6 RR7 is executed between QD and or and the different data will be read Thus in multithread environment when calling API function more than twice to execute the objective operation the user needs not to perform such an operation or needs to take exclusive control When the operation is finished by calling Nmc_xxx OutpMC8043P function once it properly works in multithread environment Each function of Nmc_xxx OutpMC8043P takes exclusive control each other 89 NOVA electronics Mc8043P M90 9 1 4 API Supporting Function used by MC8041P Driver API provided by MC8043P SYS and MC8043P DLL For the user already developing the application of MC8041P this driver supports the following MC8041P function The user can access MC8043P using the following function For the user who newly develops the application of MC8043P use 9 1 3 API MC8043P Driver Function 9 1 4 1 VC When one MC8043P board is used When programming in VC and using one MC8043P board the following function can be used Before using the following function set 0 to the value of rotary switch on the board Function Name Function and Content OpenCard Start MC8043P Perform to MC8043P whose board number
27. NormallyClose Sample A FormA frm MC8043P_DLL bas Module1 bas VBSample vbp exe VBSampleA exe Sample A FormA frm MC8043P_DLL bas Modulel bas VBSample vbp exe VBSampleA exe Sample C FormC frm MC8043P_DLL bas VBSample vbp exe VBSampleC exe Sample E Form1 frm MC8043P_DLL bas Modulel bas MC_Sample vbp exe VBSampleE exe Device driver Install program for device driver Dynamic link library for driver Version file of driver MC8043P DLL Declaration definition file for VB6 0 MC8043P DLL Declaration definition file for VB NET 2003 MC8043P DLL Library file for VC6 0 MC8043P DLL Header file function declaration definition for VC6 0 Sample program A Normally Close MC8043P DLL Declaration definition file for VB6 0 MC8043P Control function sample Project file for VB sample program VB6 0 Executable file Sample program A MC8043P DLL Declaration definition file for VB6 0 MC8043P Control function sample Project file for VB sample program VB6 0 Executable file Sample program C MC8043P DLL Declaration definition file for VB6 0 Project file for VB sample program VB6 0 Executable file Sample program E MC8043P DLL Declaration definition file for VB6 0 MC8043P Control function sample Project file for VB sample program VB6 0 Executable file 97 NOVA electronics
28. Set home search speed vc void Nmc_HomeSpd int No int Axis long wdata VB Sub Nmc_HomeSpd ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_HomeSpd ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VC Nmc_HomeSpd No AXIS_U 200 Set 200 to home search speed U axis VB Call Nmc_HomeSpd No AXIS_U 200 Nmc_ExpMode Set extension mode vc void Nmc_ExpMode int No int Axis long EM6_data long EM7_data VB Sub Nmc_ExpMode ByVal No As Long ByVal Axis As Long ByVal EM6_data As Long ByVal EM7_data As Long VB NET Sub Nmc_ExpMode ByVal No As Integer ByVal Axis As Integer ByVal EM6_data As Integer ByVal EM7_data As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details EM6_data Data to be set in extension mode register EM6 EM7_data Data to be set in extension mode register EM7 Return Value None Example Set enable for all filters delay time 512us and execution of automatic home search step1 2 and 4 to X axis extension mode VC Nmc_ExpMode No A
29. WR1 Mode Register 1 Writing O O O Nmc_WriteReg2 WR2 Mode Register 2 Writing O O O Nmc_WriteReg3 WR3 Mode Register 3 Writing O O O 48 Nmc_WriteReg4 WR4 Output Register Writing O O O Nmc_WriteReg5 WR35 Interpolation Mode Register Writing O O O Nmc_WriteReg6 WR6 Write Data Register 1 Writing O O O 49 Nmc_WriteReg7 WR7 Write Data Register 2 Writing O O O 4 Read Register Function Name Description VC VB VB NET Page Nmc_ReadReg0 RRO Main Status Register Reading O O O 49 Nmc_ReadReg1 RR1 Status Register 1 Reading O O O 50 Nmc_ReadReg2 RR2 Status Register 2 Reading O O O Nmc_ReadReg4 RR4 Input Register 1 Reading O O O Nmc_ReadReg5 RR5 Input Register 2 Reading O O O Nmc_ReadReg6 RR6 Read Data Register 1 Reading O O O 51 Nmc_ReadReg7 RR7 Read Data Register 2 Reading O O O 5 Parameter Settings Function Name Description VC VB VB NET Page Nmc_Range Range Setting O O O 51 Nmc_Jerk Jerk Setting O O O 52 Nmc_Acc Acceleration Setting O O O Nmc_Dec Deceleration Setting O O O Nmc_StartSpd Initial Speed Setting O O O 53 Nmc_Speed Drive Speed Setting O O O Nmc_Pulse Output Pulse Number Interpolation Finish Point Setting For VC O x x n Nmc_Pulse_VB Output Pulse Number Interpolation Finish Point Setting For VB x O O 54 Nmc_DecP Manual Decelerating Point Setting For VC O x x n Nmc_DecP_VB Manual Decelerating Point Setting For VB x O O Nmc_Center Circular Center Point Setting O O O 55 Nmc_Lp Logical P
30. Y Third axis Z Ret Nmc_3BPExec_BG hWnd No Data3Bp 2 0x24 Execute 3 axis BP interpolation The number of data is 2 X Y Z axes if Ret BP_START AfxMessageBox Interpolation has started Return value is correct Interpolation has started BEGIN_MESSAGE_MAP CMC_SAMPLEDlg CDialog WM_BP_END message received function settting ON_MESSAGE WM_BP_END OnMsg_BP END_MESSAGE_MAP WM_BP_END message received function afx_msg LRESULT CMC_SAMPLEDlg OnMsg_BP WPARAM BoardNo LPARAM Status if Status BP_END Return value is correct Interpolation has finished AfxMessageBox Interpolation has been successfully completed return 0 Dim Data3Bp 1 As DATA_3BP 3 axis BP interpolation data 3 axis BP interpolation data setting Data3Bp 0 Bp1p amp HFF30 Data3Bp 0 Bp1m amp HO Data3Bp 0 Bp2p amp HO Data3Bp 0 Bp2m amp H84FF Data3Bp 0 Bp3p amp HO Data3Bp 0 Bp3m amp HAC35 Data3Bp 1 Bp1p amp HAC35 Data3Bp 1 Bp1m amp HO Data3Bp 1 Bp2p amp HC000 Data3Bp 1 Bp2m amp H36E7 Data3Bp 1 Bp3p amp HC000 Data3Bp 1 Bp3m amp H3F3F Call Nmc_WriteReg5 No amp H24 Axis assignment for interpolation Master axis X Second axis Y Third axis Z Ret Nmc_3BPExec_BG hWnd No Data3Bp 0 2 amp H24 False Execute 3 axis BP interpolation The number of data is 2 X Y Z axes If Ret BP_START Then Return value is correct Interpolation has started Call MsgBox Interpolatio
31. amp Rr3X amp Rr3Y amp Rr3Z amp Rr3U 3 Use ResetEventMC8043P to release the interrupt handling function By executing this function the user function is not called when an interrupt occurs 85 NOVA electronics MC8043P M86 E Continuous Interpolation When executing the continuous interpolation of MC8043P please read the chapter 2 4 5 Continuous Interpolation of MCX314As user s manual carefully and execute the process described in the chapter in the application Continuous Interpolation Functions execute some of the process by DLL So they will be used to execute the process of the continuous interpolation But there are some notes when using Continuous Interpolation Functions Please note them l Nmc_2CIPExec Nmc_3CIPExec Nmc_ 2CIPExec_BG Nmc_3CIPExec_BG Notes for when using Continuous Interpolation Function Continuous interpolation function writes the next segment data such as the finish point the center point etc and writes the interpolation command and checks the error If the error occurs the function returns If not it will check whether the data of the next segment is writable or not check the bit D9 of RR0 When it becomes writable it will write the data of the next segment and the command of the interpolation This function repeats the process until the continuous interpolation is completed Because the loops that check the error and check whether the next segment data is writable are alw
32. for this device so that I can choose a specific driver then click Next Upgrade Device Driver Wizard Install Hardware Device Drivers Na 4 device driver is a software program that enables a hardware device to work with SY an operating system This wizard upgrades drivers for the following hardware device gt MC8043P Device Upgrading to a newer version of a device driver may add functionality to or improve the performance of this device What do you want the wizard to do Search for a suitable driver for my device recommended 30 NOVA electronics MC8043P M31 4 Click Have Disk button and then click Browse button Upgrade Device Driver Wizard Select a Device Driver Which driver do you want to install for this device S Select the manufacturer and model of your hardware device and then click Next If you have a disk that contains the driver you want to install click Have Disk Models MC8043P Device Show compatible hardware Have Disk C Show all hardware of this device class pe 5 Point the directory to the driver folder Driver then click Open and OK Then click Next button twice in the next and after the next window 2x Look in Sy Drivertver 2 0 0 7 e 8c a History E Desktop A My Documents Ror My Computer My Network P Cancel File name MC8043F int z e Files of type Setup Information inf h 6 Af
33. hardware installation CD or on the Windows Update Web site with your permission Read our privacy policy Can Windows connect to Windows Update to search for software O Yes this time only O Yes now and every time connect a device No not this time Click Next to continue Bach 33 NOVA electronics MC8043P M34 4 Hardware Update Wizard will open Select Install from a list or specific location Advanced then click Next Hardware Update Wizard This wizard helps you install software for MC8043P Device If your hardware came with an installation CD lt 6 or floppy disk insert it now What do you want the wizard to do O Install the software automatically Recommended Click Next to continue 5 Select Don t search I will choose the driver to install then click Next Hardware Update Wizard Please choose your search and installation options a S O Search for the best driver in these locations Use the check boxes below to limit or expand the default search which includes local paths and removable media The best driver found will be installed Search removable media floppy CD ROM Include this location in the search H Documents and Settings nova My Documents t Don t search will choose the driver to install Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware
34. second argument must be fixed to 0 CloseCard_N Terminate MC8043P Input Parameter ByVal As Integer Board number setting value of rotary switch 0 9 on the board 1 Return Value As Integer If the function succeeds the return value is nonzero If the function fails the return value is 0 lt Example gt status CloseCard_N 1 Close the board 0 OutW_N Write 1 word 16 bit into output port Input Parameter ByVal As Integer Board number setting value of rotary switch 0 9 on the board 1 ByVal As Short Write register number WRO WR7 ByVal As Integer Data to be written Return Value None lt Example gt Call OutW_N 1 WRO amp H8000 Soft reset the board Note The write register numbers WRO WR7 are defined in the MC8043P_DLL vb file InW_N Read out 1 word 16 bit from input port Input Parameter ByVal As Integer Board number setting value of rotary switch 0 9 on the board 1 ByVal As Short Read register number RRO RR7 Return Value As Integer 1 word read out from input port lt Example gt data InW_N 1 RRO Read out the read register RRO Note The read register numbers RRO RR7 are defined in the MC8043P_DLL vb file CloseCard_all Terminate all the MC8043P Input Parameter None Return Value As Integer If the function succeeds the return value is nonzero If the function fails the return value is 0 lt Example gt status CloseCard_all 95 NOVA electronics M
35. short circuiting 2 and 3 of JP3 the interface circuit for the encoder Z phase high speed photo coupler TLP115A is connected to nIN2 of MCX314As and automatic home search function of MCX314As can be used For details on automatic home search see chapter 2 5 of MCX314As user s manual Each inpu signal can be set enable disable and logical level in mode setting When enable is set in mode setting and when this signal becomes active during driving drive pulse stops to output When in acceleration deceleration driving it stops in deceleration and when in constant driving it stops immediately After resetting all the signals are disabled For instance in IN3 signal of X axis when D7 D6 bit of XWRI1 register is set to 1 0 and set to low level and enable and when current flows out from XIN3 signal pin of this board driving stops For details on mode setting see chapter 4 4 of MCX314As user s manual To enable this signal external power supply DC12 24V is needed This signal can read out the signal status by input register 1 2 RR4 5 at any time so it can be used as general input When the board is powered on the built in integral filter of MCX314As shown below becomes the setting of signal delay time 512 u sec due to the default setting of Windows device driver provided by NOVA electronics This signal delay time can be changed for circumstances of system noise For more details see chapter 2 8 and 6 16 of MCX314As user s manual MCX3
36. specified by WRS 81 NOVA electronics MC8043P M82 VB 2 axis BP interpolation Type DATA_2BP BpIp As Integer BP1P data Bplm As Integer BPIM data Bp2p As Integer BP2P data Bp2m As Integer BP2M data End Type 3 axis BP interpolation Type DATA_3BP Bplp As Integer BP1P data Bplm As Integer BPIM data Bp2p As Integer BP2P data Bp2m As Integer BP2M data Bp3p As Integer BP3P data Bp3m As Integer BP3M data End Type 2 axis continuous interpolation Type DATA 2CIP Command As Integer Command number Set one of CMD_IP_2ST CMD_IP_CW CMD_IP_CCW Speed As Integer Speed When changing the speed set 1 8000 When not changing set 0 EndP1 As Long Finishing point The first axis EndP2 As Long Finishing point The second axis Centerl As Long Circular center point The first axis Center2 As Long Circular center point The second axis End Type Note The first or second axis must be specified by WRS 3 axis continuous interpolation Type DATA_3CIP EndP1 As Long Finishing point The first axis EndP2 As Long Finishing point The second axis EndP3 As Long Finishing point The third axis Speed As Integer Speed When changing the speed set 1 8000 When not changing set 0 End Type Note The first second or third axis must be specified by WRS 82 NOVA electronics MC8043P M83 VB NET 2 axis BP interpolation Structure DATA_2BP Dim Bplp As Short BP
37. stops immediately and terminates the executed interpolation process in Nmc_xxx interpolation function When stopping the interpolation process using Nmc_IPStop the return value of each interpolation function is the following error code BP interpolation BP_USER_STOP Continuous interpolation CIP_USER_STOP vc BOOL Nmc_IPStop int No VB Function Nmc_IPStop ByVal No As Long As Long VB NET Function Nmc_IPStop ByVal No As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Return Value VC If the function succeeds the return value is TRUE If the function fails the return value is FALSE VB If the function succeeds the return value is nonzero If the function fails the return value is 0 Example VC Nmc_IPStop No Stop the interpolation process during driving VB Call Nmc_IPStop No 77 NOVA electronics E Footnote 1 Each definition is defined in the following files VO eiee MC8043P_DLL H VB srpen MC8043P_DLL bas VB NET MC8043P_DLL vb VC definition is as follows QDAddress definition define MCX314_WRO 0x0000 define MCX314_WRI1 0x0001 define MCX314_WR2 0x0002 define MCX314_WR3 0x0003 define MCX314_WR4 0x0004 define MCX314_WR5 0x0005 define MCX314_WR6 0x0006 define MCX314_WR7 0x0007 define MCX314 RRO 0x0000 define MCX314 RR1 0x0001 define MCX314 RR2 0x0002 define MCX314 RR3 0x0003 define MCX314_ RR4 0x0004 defi
38. vc long Nmc_ReadReg5 int No VB Function Nmc_ReadReg5 ByVal No As Long As Long VB NET Function Nmc_ReadReg5 ByVal No As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Return Value The data of RR5 Input register 2 Example VC Data Nmc_ReadReg5 No Read out RRS VB Data Nmc_ReadReg5 No 50 NOVA electronics MC8043P M51 Function Name Function and Content Nmc_ReadReg6 Read out data from RR6 Read data register 1 vc long Nmc_ReadReg6 int No VB Function Nmc_ReadReg6 ByVal No As Long As Long VB NET Function Nmc_ReadReg6 ByVal No As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Return Value The data of RR6 Read data register 1 Example VC Data Nmc_ReadReg6 No Read out RR6 VB Data Nmc_ReadReg6 No Nmc_ReadReg7 Read out data from RR7 Read data register 2 vc long Nmc_ReadReg 7 int No VB Function Nmc_ReadReg7 ByVal No As Long As Long VB NET Function Nmc_ReadReg7 ByVal No As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Return Value The data of RR7 Read data register 2 Example VC Data Nmc_ReadReg7 No Read out RR7 VB Data Nmc_ReadReg7 No Nmc_Range Set the range vc void Nmc_Range int No int Axis long wdata VB Sub Nmc_Range ByVal No As Long ByVa
39. 1 2 short circuited JP3 2 3 short circuited 1 3 PCI Bus Interface HM Occupied I O Address In this board SA15 4 is address decoded and the internal 16 bit read write register can be selected by SA3 1 of MCX314As The board requires 16 I O address locations for PCI bus I O addressing is determined by plug and play function of Windows E Data Length Data length is 16 bit Read Write access cannot be performed per byte E Interrupt Signal When using an interrupt to PCI bus the board uses IRQ determined by plug and play function of Windows NOVA electronics MC8043P M3 1 4 Each Axis I O Interface E Drive Pulse Output nP P N nP P N Drive pulses in the direction for motor driving are output a 50 duty cycle of from 1PPS to 4MPPS Drive pulse output signals of each direction are the differential line drive output of AM26C31 line driver or equivalent E General Output NOUT7 4 Each axis has 4 general outputs Output buffer uses SN74LS06 or equivalent and is the open collector output These signals can be used as a stack counter clear servo free and alarm reset for a servomotor E Over Run Limit Input nNLMT nLMT Input signal to disable output pulse for and direction respectively Decelerating stop and instant stop for active can be selected in mode setting These input signals are isolated by photo coupler from internal circuit DC12 24V power supply is needed E Decelerating Stop Instant Stop Input nIN3 1
40. 14As 5V VEX 12 24V 7 ___ nIN3 7 nIN2 4 B lt n filtdr nI N1 74AC157 1 WV b 4 o niNi nINOP A Sin o nINON TLP115A Co Saas at Delay time 512 u SEC defati t 1 Switch by JP3 JP3 nINO nIN2 switching JP3 Normal The board I O connector nINOP N signal is connected to nINO of MCX314As and 1 2 short circuit Default the board I O connector nIN2 signal is connected to nIN2 of MCX314As JP3 Cross The board I O connector nINOP N signal is connected to nIN2 of MCX314As and 2 3 short circuit the board I O connector nIN2 signal is connected to nINO of MCX314As Decelerating Stop Instant Stop Input Signal Circuit 3 6 Input Signal for Servo Motor nINPOS nALARM nINPOS input signal is applied to the in position output of a servo motor driver Enable disable and logical level can be set in mode setting of MCX314As When enable is set and after completion of the driving nDRV bit of main status register RRO returns to 0 after this signal becomes active nALARM input signal is applied to the alarm output from a servo motor driver Enable disable and logical level can be set in mode setting When enable is set nALARM input signal is monitored and when nALARM is active the ALARM bit of status 10 NOVA electronics MC8043P M11 register 2 nRR2 is set to 1 When the signal becomes active during driving driving will stop immediately After rese
41. 3Bp 0 Bp2p amp HO Data3Bp 0 Bp2m amp H84FF Data3Bp 0 Bp3p amp HO Data3Bp 0 Bp3m amp HAC35 Data3Bp 1 Bp1p amp HAC35 Data3Bp 1 Bp1m amp HO Data3Bp 1 Bp2p amp HC000 Data3Bp 1 Bp2m amp H36E7 Data3Bp 1 Bp3p amp HC000 Data3Bp 1 Bp3m amp H3F3F Call Nmc_WriteReg5 No amp H24 Axis assignment for interpolation Master axis X Second axis Y Third axis Z Ret Nmc_3BPExec No Data3Bp 0 2 amp H24 False Execute 3 axis BP interpolation The number of data is 2 X Y Z axes If Ret BP_END Then Return value is correct Call MsgBox Successful completion End If 64 NOVA electronics MC8043P M65 Function Name Function and Content Nmc_2BPExec_BG Execute 2 axis bit pattern interpolation in the background using the specified interpolation data This function returns control right after the interpolation process started and executes the interpolation in the background WM_BP_END message is sent to the specified window at the end of the interpolation and finishing status is passed vc DWORD Nmc_2BPExec_BG HWND User_hWnd int No DATA_2BP pData2Bp int DataCnt int IpAxis BOOL ContinueFlg FALSE VB Function Nmc_2BPExec_BG ByVal User_hWnd As Long ByVal No As Long ByRef pData2Bp As DATA_2BP ByVal DataCnt As Long ByVal IpAxis As Long ByVal ContinueFlg As Long As Long VB NET Function Nmc_2BPExec_BG ByVal User_hWnd As Integer ByVal No As Integer ByRef pDat
42. 3CIPExec ByVal No As Long ByRef pData3Cip As DATA_3CIP ByVal DataCnt As Long ByVal IpAxis As Long ByVal SpdChgFlg As Long ByVal ContinueFlg As Long As Long VB NET Function Nmc_3CIPExec ByVal No As Integer ByRef pData3Cip As DATA_3CIP ByVal DataCnt As Integer ByVal IpAxis As Integer ByVal SpdChgFlg As Integer ByVal ContinueFlg As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board pData3Cip Pointer to an array of DATA_3CIP structures user defined type in VB Set the 3 axis continuous interpolation data to DATA_3CIP See footnote 3 for DATA_3CIP DataCnt The number of 3 axis continuous interpolation data Specify the number of the DATA_3CIP structure user defined type array IpAxis Axis to execute interpolation Specify the same value as the setting value of WR5 DO D5 Axis assignment See footnote 4 SpdChgFlg Set the flag to change the speed during the interpolation process If you change the speed See footnote 5 VC TRUE Change FALSE Not change Can be omitted Default is FALSE VB True Change False Not change When selecting Change Refers to the setting value of DATA_3CIP Speed Set 1 8000 to Speed Changes to the setting speed Set 0 to Speed gt Not change the speed When selecting Not change Not refers to the setting value of DATA_3CIP Speed ContinueFlg Set the flag to continue when continuous interpolation stopped during driving because the drivi
43. 3P M76 Function Name Function and Content Example VC VB DATA_3CIP Data3Cip 2 3 axis continuous interpolation data 3 axis continuous interpolation data setting Data3Cip 0 EndP1 1000 Data3Cip 0 EndP2 2000 Data3Cip 0 EndP3 3000 Data3Cip 1 EndP1 2000 Data3Cip 1 EndP2 1000 Data3Cip 1 EndP3 3000 Nmc_WriteReg5 No 0x24 Axis assignment for interpolation Master axis X Second axis Y Third axis Z Ret Nmc_3CIPExec_BG hWnd No Data3Cip 2 0x24 Execute 3 axis continuous interpolation The number of data is 2 X Y Z axes if Ret CIP_START AfxMessageBox Interpolation has started Return value is correct Interpolation has started BEGIN _MESSAGE_MAP CMC_SAMPLEDlg CDialog WM_CIP_END message received function settting ON_MESSAGE WM_CIP_END OnMsg_CIP END_MESSAGE_MAP NM_CIP_END message received function afx_msg LRESULT CMC_SAMPLEDIlg OnMsg_CIP WPARAM BoardNo LPARAM Status if Status CIP_LEND AfxMessageBox Interpolation has been successfully completed Return value is correct Interpolation has finished return 0 Dim Data3Cip 1 As DATA_3CIP 3 axis continuous interpolation data 3 axis continuous interpolation data setting Data3Cip 0 EndP1 1000 Data3Cip 0 EndP2 2000 Data3Cip 0 EndP3 3000 Data3Cip 1 EndP1 2000 Data3Cip 1 EndP2 1000 Data3Cip 1 EndP3 3000 Call Nmc_WriteReg5 No amp H24 Axis assignme
44. ALSE BOOL ContinueFlg FALSE VB Function Nmc_2CIPExec ByVal No As Long ByRef pData2Cip As DATA_2CIP ByVal DataCnt As Long ByVal IpAxis As Long ByVal SpdChgFlg As Long ByVal ContinueFlg As Long As Long VB NET Function Nmc_2CIPExec ByVal No As Integer ByRef pData2Cip As DATA_2CIP ByVal DataCnt As Integer ByVal IpAxis As Integer ByVal SpdChgFlg As Integer ByVal ContinueFlg As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board pData2Cip Pointer to an array of DATA_2CIP structures user defined type in VB Set the 2 axis continuous interpolation data to DATA_2CIP See footnote 3 for DATA_2CIP DataCnt The number of 2 axis continuous interpolation data Specify the number of the DATA_2CIP structure user defined type array IpAxis Axis to execute interpolation Specify the same value as the setting value of WR5 DO D5 Axis assignment See footnote 4 SpdChgFlg Set the flag to change the speed during the interpolation process If you change the speed See footnote 5 VC TRUE Change FALSE Not change Can be omitted Default is FALSE VB True Change False Not change When selecting Change Refers to the setting value of DATA_2CIP Speed Set 1 8000 to Speed Changes to the setting speed SetOtoSpeed gt Not change the speed When selecting Not change Not refers to the setting value of DATA_2CIP Speed ContinueFlg Set the flag to continue when continuous in
45. A_3CIP is set to 1 8000 the process of interpolation function is described as follows For the first segment set the speed before executing the segment For the second or later segment set the speed right after that segment has started when the next segment is ready to be written For instance when the second segment starts and the third segment is ready to be written set the speed of the second segment Therefore after the second segment has started the speed of the first segment is applied until the speed of the second segment is set 84 NOVA electronics MC8043P M85 9 1 3 3 Usage m API Function Declaration API function declaration is defined in the following files YEr wees MC8043P_DLL H VB eree 2 MC8043P_DLL bas VB NET MC8043P_DLL vb m Usage 1 Start process gt Execute OpenMC8043P once before using each function 2 End process gt Execute CloseMC8043P or CloseAIMC8043P at the end of program Notes for Use of Function 1 About VC VB all languages When each function is used before executing OpenMC8043P function operation is not guaranteed When the board number which is not connected is assigned the operation of each function is not guaranteed 2 VC only When using the interrupt handling function the time from the interrupt generation to user defined function is not guaranteed by the nature of Windows wWhen the user tries to perform the interrupt do not execute the close handling
46. C VB MC8043P INF Install file Library Lib VB6 MC8043P_DLL BAS Declare definition file to use MC8043P DLL VB6 0 only Lib VB NET2003 MC8043P_DLL vb Declare definition file to use MC8043P DLL VB NET2003 only Lib VC6 MC8043P LIB Library to use MC8043P DLL VC only MC8043P_DLL H Header definition file to use MC8043P DLL VC only VB Sample Program Sample VB6 Sample A Sample program A VB6 0 Limit input display Logical position counter display fixed driving operation example Sample C Sample program C For multiple boards Limit input display Logical position counter display fixed driving operation example Sample E Sample program E Fixed drive for all axes RRO 1 2 4 5 reading example Sample G Sample program G BP interpolation and Continuous interpolation using interpolation function NormallyClose Sample program A NormallyClose Sample A Limit input display Logical position counter display fixed driving operation example The sample for the logic of the limit sensor is normally closed VB Sample Program Sample Sample A Sample program A VB NET2003 VB NET2003 Limit input display Logical position counter display fixed driving operation example Sample C Sample program C For multiple boards Limit input display Logical position counter display fixed driving operation example Sample E Sample program E Fixed drive for all axes RRO 1 2 4 5 reading example Sample G Sample program G BP interpolation and Continuous interp
47. C status CloseAlIIMC8043P Close all the boards VB status CloseAlIMC8043P 42 NOVA electronics MC8043P M43 Function Name Function and Content OutpMC8043P Write 2 byte data into output port vc void OutpMC8043P int No long Adr long Data VB Sub OutpMC8043P ByVal No As Long ByVal Adr As Long ByVal Data As Long VB NET Sub OutpMC8043P ByVal No As Integer ByVal Adr As Integer ByVal Data As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Adr Address to write MCX314_ WRO MCX314_WR7 See Footnote 1 for more details Ex For WRO specify MCX314_WRO and for WR1 specify MCX314_WR1 Data Data to be written Return Value None Example VC OutpMC8043P No MCX314_WRO 0x8000 Soft reset the board VB Call OutpMC8043P No MCX314_WRO amp H8000 InpMC8043P Read out 2 byte data from input port vc long InpDMC8043P int No long Adr VB Function InpMC8043P ByVal No As Long ByVal adr As Long As Long VB NET Function InpMC8043P ByVal No As Integer ByVal adr As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Adr Address to read MCX314_RRO MCX314_RR7 See Footnote 1 for more details Ex For RRO specify MCX314_RRO and for RR1 specify MCX314_RR1 Return Value Data read out from input port Example VC data InpMC8043P 0 MCX314_RR0O Read out the read re
48. C8043P M96 9 1 4 7 Notes Execute OpenCard or OpenCard_N before using each function in both VC and VB otherwise operation is not guaranteed Execute CloseCard CloseCard_N or CloseCard_all at the termination of the program When the board number which is not connected is assigned the operation of each function is not guaranteed Although VC supports the interrupt when using the interrupt handling function the time from the interrupt generation to user defined function is not guaranteed by the nature of Windows In VC when the user tries to perform the interrupt do not execute the close handling CloseCard CloseCard_N or CloseCard_all while the interrupt user defined function the function designated by OpenCard or OpenCard_N is running Before executing the close handling make sure that the interrupt user defined function is finished 96 NOVA electronics 9 2 Contents of the Accessory Software MC8043P M97 The folder tree and file list of the accessory software are as follows Note When files are copied from CD ROM to HDD the files and folders may become read only In this case remove the read only a ttribute before using Driver MC8043P sys MC8043P inf t MC8043P dll Version txt B VB6 MC8043P_DLL bas VB NET2003 MC8043P_DLL vb VC6 MC8043P lib MC8043P_DLL h Sample VB6
49. CX314_WR2 0x2000 VB Call Nmc_WriteRegSetAxis No AXIS_ALL MCX314_WR2 amp H2000 Nmc_ReadRegSetAxis Read out data from the specified read register either RR1 or RR2 for the specified axis vce long Nmc_ReadRegSetAxis int No int Axis int RegNumber VB Function Nmc_ReadRegSetAxis ByVal No As Long ByVal Axis As Long ByVal RegNumber As Long As Long VB NET Function Nmc_ReadRegSetAxis ByVal No As Integer ByVal Axis As Integer ByVal RegNumber As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to read data Assign AXIS_X for X axis AXIS_Y for Y axis AXIS_Z for Z axis and AXIS_U for U axis RegNumber Read register number to read data Assign MCX314_RR1 for RR1 and MCX314_RR2 for RR2 See Footnote 1 Return Value The data of the specified read register for the specified axis Example Read out the data of X axis RR1 VC Data Nmc_ReadRegSetAxis No AXIS_X MCX314_RR1 VB Data Nmc_ReadRegSetAxis No AXIS_X MCX314_RR1 61 NOVA electronics MC8043P M62 Function Name Function and Content Nmc_WriteData Write the specified parameter into the specified axis Execute commands for data writing vc void Nmc_WriteData int No int Axis int cmd long wdata VB Sub Nmc_WriteData ByVal No As Long ByVal Axis As Long ByVal cmd As Long ByVal wdata As Long VB NET Sub Nmc_WriteData ByVal No As Integer ByVal Axis As Intege
50. Chapter B1 VEX External Power DC12 24V 3 10 B2 B3 ZLMT Input Z axis Limit in direction 3 4 B4 ZLMT Input Z axis Limit in direction 3 4 B5 ZIN1 Input Z axis Decelerating Stop Instant Stop 3 5 B6 ZIN2 Input Z axis Decelerating Stop Instant Stop 3 5 B7 ZIN3 Input Z axis Decelerating Stop Instant Stop 3 5 B8 ULMT Input U axis Limit in direction 3 4 B9 ULMT Input U axis Limit in direction 3 4 B10 UIN1 Input U axis Decelerating Stop Instant Stop 3 5 B11 UIN2 Input U axis Decelerating Stop Instant Stop 3 5 B12 UIN3 Input U axis Decelerating Stop Instant Stop 3 5 B13 ZINPOS Input Z axis Servo Inposition 3 6 B14 ZALARM Input Z axis Servo Alarm 3 6 B15 ZECAP Input Z axis Encoder A phase 3 7 B16 ZECAN Input Z axis Encoder A phase 3 7 B17 ZECBP Input Z axis Encoder B phase 3 7 B18 ZECBN Input Z axis Encoder B phase 3 7 B19 ZINOP Input Z axis Encoder Z phase 3 7 B20 ZINON Input Z axis Encoder Z phase 3 7 B21 UINPOS Input U axis Servo Inposition 3 6 B22 UALARM Input U axis Servo Alarm 3 6 B23 UECAP Input U axis Encoder A phase 3 7 B24 UECAN Input U axis Encoder A phase 3 7 B25 UECBP Input U axis Encoder B phase 3 7 MC8043P M6 NOVA electronics MC8043P M7 Pin Signal I O Contents Chapter B26 UECBN Input U axis Encoder B phase 3 7 B27 UINOP Input U axis Encoder Z phase 3 7 B28 UINON Input U axis Encoder Z phase 3 7 B29 ZEXOP
51. DOS V PCI Bus 4 Axis Motor Control Board with Interpolation MC8043P User s Manual 2006 11 13 Ver 1 1 NOVA electronics NOVA electronics MC8043P Mi Introduction E Before You Begin Before using MC8043P please read this manual carefully to fully understand for correct use and observe all the instructions given in this manual We shall be exempted from taking responsibility and held harmless for damage or losses incurred by the user if the user fails to observe the instructions E Checking the Contents When you unpack your MC8043P package check for the following accessories If something is missing or broken contact the place of purchase MC8043P 1 1 0 Cable 1 The user s manual and software are not with the package for resource saving If you need additional manuals or software contact the place of purchase or contact us You can also download the latest manual and software from our web site http www novaelec co jp eng MCX314As Manual The circuit of MC8043P consists of mainly 4 axes motion control IC MCX314As a PCI bus interface circuit and I O interface circuits of each axis Basic functions of this board all depend on MCX314As so please refer to the user s manual of MCX314As regarding these functions This manual describes the installation on Windows how to use the library and the interface circuits of PCI bus I O address and I O signals E Caution Danger Use the following environmenta
52. NDLE If the function succeeds the driver handle returns If the function fails the return value is NULL lt Example gt Board number is 0 status OpenCard_N 1 isr When using the interrupt and isr is specified to the interrupt function status OpenCard_N 1 NULL Board number is 0 when not using the interrupt CloseCard_N Terminate MC8043P Input Parameter int Board number setting value of rotary switch 0 9 on the board 1 Return Value BOOL If the function succeeds the return value is TRUE If the function fails the return value is FALSE lt Example gt CloseCard_N 1 Board number is 0 OutW_N Write 1 word 16 bit into output port Input Parameter int Board number setting value of rotary switch 0 9 on the board 1 WORD Write register number WRO WR7 int Data to be written Return Value None lt Example gt OutW_N 1 WRO 0x8000 Soft reset the board Note The write register numbers WRO WR7 are defined in the MC8043P_DLL h file InW_N Read out 1 word 16 bit from input port Input Parameter int Board number setting value of rotary switch 0 9 on the board 1 WORD Read register number RRO RR7 Return Value WORD 1 word read out from input port lt Example gt data InW_N 1 RRO Read out the read register RRO Note The read register numbers RRO RR7 are defined in the MC8043P_DLL h file Concerning RR3 register data reading see the description of ReadRR3_N function C
53. OS Click Browse button and select the Driver folder in CD ROM When CD ROM is in D drive select D Driver or select the downloaded driver folder on hard disc and then click OK x Insert the manufacturer s installation disk into the drive OK selected and then click OK Copy manufacturer s files from o Driver Ver 2 0 0 z 10 The Driver Files Search Results dialog box opens Make sure the proper file name driver mc8043p inf is indicated then click Next Found New Hardware Wizard Driver Files Search Results Na The wizard has finished searching for driver files for your hardware device Cy The wizard found a driver for the following device Other PCI Bridge Device Windows found a driver for this device To install the driver Windows found click Next d driver ver 2 0 0 mc8043p inf 23 NOVA electronics MC8043P M24 11 After the installation is successfully completed the following dialog box opens then click Finish Found New Hardware Wizard Completing the Found New D Hardware Wizard gt MC8043P Device Windows has finished installing the software for this device To close this wizard click Finish lt Back 12 The installation has finished Check the installation is successfully completed by the following steps Control Panel System Hardware tab Device Manager shown on the left below double click MC8043P Devi
54. P define BP_DRIVE_ERR Continuous Interpolation m Normal define CIP_START define CIP_END 0x121 0x 122 0x123 0x201 0x202 m Errors before starting the interpolation define CIP_CNT_ERR define CIP_ALREADY_EXEC define CIP THREAD ERR define CIP MALLOC_ERR define CIP_CMD_ERR 0x211 0x212 0x213 0x214 0x215 m Errors during the interpolation driving define CIP_STOP define CIP_USER_STOP define CIP_DRIVE_ERR 0x221 0x222 0x223 Finishing Status BP interpolation has started in the background BP interpolation has been successfully completed The number of the specified data is out of range BP interpolation or continuous interpolation is already running Thread cannot be started Memory cannot be allocated BP interpolation stopped during driving too fast to stack next data The user aborted BP interpolation Error occurred in MC8043P during BP interpolation When the error status was set to RRO Finishing Status Continuous interpolation has started in the background Continuous interpolation has been successfully completed The number of the specified data is out of range BP interpolation or continuous interpolation is already running Thread cannot be started Memory cannot be allocated Command error The wrong command was specified by the user Continuous interpolation stopped during driving t
55. Power VEX iicisiadasshasidalidaladaialoiads idle idadhsenneatceenentiseeeenbbteestebepenbysebenpbpeebenpbesebenpnnandd abedennd 13 AMEND Meee ee eee eee Enea tele eae ence re een 14 5 Connection Example for Motor Driver 15 5 1 Connection Example for Stepper Motor ccccceeceeecceceeeeeeeeeeeeceaaeeeeeeeeeeeeeaaaaaeeeeeeseeseaaaneeneeees 15 5 2 Connection Example for AC servo motor Crivelr ccccccceeeeeeeeeeeeeaeeeeeeeeeeeeeeaaaeaeeeeeeeeeseaaaenteneeees 16 6 Input Output Signals TiMIng ccccceeeeeeeeeeeees 17 Gil RESCUE jc ctecatsssasszreserecssnnans casein esse Ceeel Tih ise a ates Ta ieee le Tei alti 17 62 independent DAVINA airsoii reee een a O 17 LG pS0 MBN DOU 916 k 1 11 19 Armee Se A ee epee A EN 17 6 4 INpULPUISETIMING 3 3 oS aaa ata aaa aaa aaa eects 18 Encoder 2 phase Pulse Input ccccccsecccecseeeceeeeeeeeeeeeeeeeeeeeeeeeeeeeeeseeeeeeeeeeeeeeeeeeesaeeeeesaeeeeesaaeeeeeaeeeeeea 18 Up Down Pulse INPUt cece cc ccecc cece eeeee eee ee cece eee ee eee ee ceed Ae EEAG A EEEAGAEEEAG A EEE GHSSSEAGA OS SEAGASSeeEGASeEEGGOOSEEOaEOEEEES 18 6 5 losan Stop NIN asses sea aredteieteietsteteiebeie tote Meteiebieteteleletebibetetalbtetetetiietebelitetete lite alata iaidtetes 18 E Instant Stop by External Signall ccccceccccceeeeeeeeee eee aeeeeeeeeeeeeeaaeeeeeeeeeeaaaaeaeeeeeeeesaaaeeeeeeeeeesaaaneeeeess 18 E Instant Stop b Commande sanse oh See
56. RQ and conflicts Control Panel System Hardware tab Device Manager Properties Device Manager q MC8043P Device Properties 3 Display adapters Wii Input Output Range C800 C80F DYD CD ROM drives QW Input Output Range CCOO CC3F 4 IDE ATAJATAPI controllers OM Interrupt Request 18 ee Keyboards 3 a other pointing devices setting based on 8 Network adapters Q nova Other devices Ports COM amp LPT 4 Sound video and game controllers Storage volumes System devices Universal Serial Bus controllers Vv Use automatic settings 25 NOVA electronics 8 3 2 Windows XP MC8043P M26 Before starting the installation procedure ensure that you are logged on to Windows with a user name having administrator authority Otherwise the installation is not successfully completed 1 Prepare the device driver by chapter 8 1 2 Make sure that the board is seated properly in the PC by chapter 8 2 3 Turn on the PC and start Windows XP 4 Log on to Windows with a user name having administrator authority 5 For Windows XP service pack 2 users the following wizard appears Click No not this time and then click Next to continue For Windows XP service pack 1 users the following wizard does not appear so skip this step Found New Hardware Wizard Welcome to the Found New Hardware Wizard Windows will search for current and updated software by looking on your c
57. UT5 nOUT4 General output signal outputs NOUT7 DSND nOUT6 ASND nOUTS CMPM and nOUT4 CMPP signals of MCX314As through buffer 74LS06 At resetting each output signal will be OFF MCX314As nOUT7 DSND ro o nOUT amam Do o nOUT6 osom moo nOUTS nouTa cup R nOUT4 74LS06 Ty GND General Output Circuit General output signals can be used as a stack counter clear alarm reset and excitation OFF signal of a motor driver In addition these can output the accelerating decelerating drive status and small and large status of a position counter and compare register For the setting of general output signals see chapter 2 9 8 and 4 6 of MCX314As user s manual And for the accelerating decelerating drive output see 2 9 7 and 4 6 and for the small and large status output of a position counter and compare register see 2 3 and 4 6 NOVA electronics MC8043P M9 3 4 Over Run Limit Input Signal nLMT nLMT Input signal to restrain each drive pulse in the direction This input signal is connected to the limit input of MCX314As through a photo coupler After resetting MCX314As becomes low active so limit function works when current flows out from a signal pin nLMT nLMT The logical level and decelerating instant stop can be changed For details on mode setting see chapter 4 5 of MCX314As user s manual To enable this signal external power supply DC12 24V is needed When the board is powered on the built in integral filt
58. VB Function Nmc_ReadLp ByVal No As Long ByVal Axis As Long As Long VB NET Function Nmc_ReadLp ByVal No As Integer ByVal Axis As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to read data Assign AXIS_X for X axis AXIS_Y for Y axis AXIS_Z for Z axis and AXIS_U for U axis Return Value The value of the current logical position counter Example VC Data Nmc_ReadLp No AXIS_X Read out logical position counter of X axis VB Data Nmc_ReadLp No AXIS_X Nmc_ReadEp Read out real position counter vc long Nmc_ReadEp int No int Axis VB Function Nmc_ReadEp ByVal No As Long ByVal Axis As Long As Long VB NET Function Nmc_ReadEp ByVal No As Integer ByVal Axis As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to read data Assign AXIS_X for X axis AXIS_Y for Y axis AXIS_Z for Z axis and AXIS_U for U axis Return Value The value of the current real position counter Example VC Data Nmc_ReadEp No AXIS_Y Read out real position counter of Y axis VB Data Nmc_ReadEp No AXIS_Y 58 NOVA electronics MC8043P M59 Function Name Function and Content Nmc_ReadSpeed Read out the current drive speed vc long Nmc_ReadSpeed int No int Axis VB Function Nmc_ReadSpeed ByVal No As Long ByVal Axis As Long As Long VB NET Function Nmc_ReadSpeed ByVal No As Integer By
59. Val Axis As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to read data Assign AXIS_X for X axis AXIS_Y for Y axis AXIS_Z for Z axis and AXIS_U for U axis Return Value The current drive speed Example VC Data Nmc_ReadSpeed No AXIS_Z Read out the current drive speed of Z axis VB Data Nmc_ReadSpeed No AXIS_Z Nmc_ReadAccDec Read out the current acceleration deceleration Read out the value of the current acceleration or deceleration during driving When the driving stops the read data is random number vc long Nmc_ReadAccDec int No int Axis VB Function Nmc_ReadAccDec ByVal No As Long ByVal Axis As Long As Long VB NET Function Nmc_ReadAccDec ByVal No As Integer ByVal Axis As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to read data Assign AXIS_X for X axis AXIS_Y for Y axis AXIS_Z for Z axis and AXIS_U for U axis Return Value The current acceleration deceleration Example VC Data Nmc_ReadAccDec No AXIS_U Read out the current acceleration deceleration of U axis VB Data Nmc_ReadAccDec No AXIS_U Nmc_ReadSyncBuff Read out synchronous action buffer register vc long Nmc_ReadSyncBuff int No int Axis VB Function Nmc_ReadSyncBuff ByVal No As Long ByVal Axis As Long As Long VB NET Function Nmc_ReadSyncBuff ByVal No As Integer ByVal Ax
60. Val wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VC Nmc_Center No AXIS_Y 1500 Set 1500 to circular center point Y axis VB Call Nmc_Center No AXIS_Y 1500 Nmc_Lp Set logical position counter vc void Nmc_Lp int No int Axis long wdata VB Sub Nmc_Lp ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_Lp ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VC Nmc_Lp No AXIS_ALL 0 Set 0 to logical position counter of all axes VB Call Nmc_Lp No AXIS_ALL 0 Nmc_Ep Set real position counter vc void Nmc_Ep int No int Axis long wdata VB Sub Nmc_Ep ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_Ep ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to b
61. WM_BP_END Then __ BP interpolation finishing message If Param BP_END Then Return value is correct Interpolation has finished Call MsgBox Interpolation has been successfully completed End If End If WindowProc CallWindowProc glpPrevWndProc hw uMsg wParam IParam End Function In VB NET the following message received function is applied WM_BP_END message received function Protected Overrides Sub WndProc ByRef m As Message If m Msg WM_BP_END Then BP interpolation finishing message If Param BP_END Then Return value is correct Interpolation has finished Call MsgBox Interpolation has been successfully completed End If End If MyBase WndProc m End Sub 66 NOVA electronics MC8043P M67 Function Name Function and Content Nmc_3BPExec_BG Execute 3 axis bit pattern interpolation in the background using the specified interpolation data This function returns control right after the interpolation process started and executes the interpolation in the background WM_BP_END message is sent to the specified window at the end of the interpolation and finishing status is passed vc DWORD Nmc_3BPExec_BG HWND User_hWnd int No DATA_3BP pData3Bp int DataCnt int IpAxis BOOL ContinueFlg FALSE VB Function Nmc_3BPExec_BG ByVal User_hWnd As Long ByVal No As Long ByRef pData3Bp As DATA_3BP ByVal DataCnt As Long ByVal IpAxis As Long ByVal ContinueFlg As Long As Long VB NET Fun
62. XIS_X 0x5F00 0x0045 VB Call Nmc_ExpMode No AXIS_X amp H5F00 amp H0045 57 NOVA electronics MC8043P M58 Function Name Function and Content Nmc_SyncMode Set synchronous action mode vc void Nmc_SyncMode int No int Axis long SM6_data long SM7_data VB Sub Nmc_SyncMode ByVal No As Long ByVal Axis As Long ByVal SM6_data As Long ByVal SM7_data As Long VB NET Sub Nmc_SyncMode ByVal No As Integer ByVal Axis As Integer ByVal SM6_data As Integer ByVal SM7_data As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details SM6_data Data to be set in synchronous action mode register SM6 SM7_data_ Data to be set in synchronous action mode register SM7 Return Value None Example Set start fixed driving in the direction of Y axis at the termination of X axis driving 1 Set the activation factor D END to X axis synchronous action mode for Y axis activation 2 Set fixed driving in the direction FDRV as action to Y axis synchronous action mode VC 1 Nmc_SyncMode No AXIS_X 0x2020 0 2 Nmc_SyncMode No AXIS_Y 0 0x0001 VB 1 Call Nmc_SyncMode No AXIS_X amp H2020 0 2 Call Nmc_SyncMode No AXIS_Y 0 amp H0001 Nmc_ReadLp Read out logical position counter vc long Nmc_ReadLp int No int Axis
63. a is 2 X Y axes if Ret BP_START AfxMessageBox Interpolation has started Return value is correct Interpolation has started BEGIN _MESSAGE_MAP CMC_SAMPLEDlg CDialog WM_BP_END message received function settting ON_MESSAGE WM_BP_END OnMsg_BP END_MESSAGE_MAP WM_BP_END message received function afx_msg LRESULT CMC_SAMPLEDlg OnMsg_BP WPARAM BoardNo LPARAM Status if Status BP_END Return value is correct Interpolation has finished AfxMessageBox Interpolation has been successfully completed return 0 Dim Data2Bp 1 As DATA_2BP 2 axis BP interpolation data 2 axis BP interpolation data setting Data2Bp 0 Bp1p amp HO Data2Bp 0 Bp1m amp H2BFF Data2Bp 0 Bp2p amp HFFD4 Data2Bp 0 Bp2m amp HO Data2Bp 1 Bp1p amp HF6FE Data2Bp 1 Bp1m amp HO Data2Bp 1 Bp2p amp HF Data2Bp 1 Bp2m amp H3FCO Call Nmc_WriteReg5 No amp H4 Axis assignment for interpolation Master axis X Second axis Y Ret Nmc_2BPExec_BG hWnd No Data2Bp 0 2 amp H4 False Execute 2 axis BP interpolation The number of data is 2 X Y axes If Ret BP_START Then Return value is correct Interpolation has started Call MsgBox Interpolation has started End If End Sub In VB the following message received function is applied WM_BP_END message received function Function WindowProc ByVal hw As Long ByVal uMsg As Long ByVal wParam As Long ByVal IParam As Long As Long If UMsg
64. a2Bp As DATA_2BP ByVal DataCnt As Integer ByVal IpAxis As Integer ByVal ContinueFlg As Integer As Integer Input Parameter User_hWnd_ Window handle of the user application No Board number setting value of rotary switch 0 9 on the board pData2Bp Pointer to an array of DATA_2BP structures user defined type in VB Set the 2 axis BP interpolation data to DATA_2BP See footnote 3 for DATA_2BP DataCnt The number of 2 axis BP interpolation data Specify the number of the DATA_2BP structure user defined type array IpAxis Axis to execute interpolation Specify the same value as the setting value of WR5 DO D5 Axis assignment See footnote 4 ContinueFlg Set the flag to continue when BP interpolation stopped during driving because the driving speed is too fast to stack the next data VC TRUE Continue FALSE Not continue Can be omitted Default is FALSE VB True Continue False Not continue Return Value If the interpolation process has been successfully started in the background the return value is BP_START If an error occurred before starting the interpolation process the return value is the following Error code errors before starting the interpolation m Normal start BP_START BP interpolation has been successfully started in the background m Error code errors before starting the interpolation BP_CNT_ERR The number of the specified data is out of range BP_ALREADY_EXEC BP interpolation or continuous interpolati
65. ae Ae eee A ee ee es Pe ee ee 18 6 6 Decelerating Stop TIMING riesia aaan e E EE EE E E ERE E E E EE nE EErEE 19 E Decelerating Stop by External Signal ccccccececeeeeeeeeeeeeeeeeeeeaeeeeeeeeeeeaaaeeeeeeeeeeeseaaeeeeeeeeeesaaaneeeeees 19 E Decelerating Stop by Command ccccccee eee eeeeeeeeeeeeeeeaeeeeeeeeeeeeaaeeeeeeeeeeeeaaaaeeeeeeeeeaaaeeeeeeeeeeeeaaesaaaees 19 Board DIMCNSIONS 2i028si2 ee ena a 20 NOVA electronics MC8043P Miii SMS CAN ALON sste E 21 8 1 Preparation of Driver SoftWare tis saciasctacotcsdiaadbanatanadaaetgeetttacateSeeddasacendcceebengagsghennaeadtedetentietecateletads 21 8 2 How to Install the Board into your PCO reer rere reer ee eeeeeeeeeeeeeeeeeeeeeeeeennegs 21 8 3 How fo Install Device Drivern ou Oe ona nial ai aT ai aT i ai TTS aa 22 3 1 _ Windows 2000 c0nicisn abana hides iin tivities itive E E E T E 22 8 3 2 WINDOWS XP T a r a deste E ea a Ea a e a E Se a a a e e EA R Eni 26 8 4 Board Removal snsnnstininiee E e S 29 8 4 1 Windows 2000X P a Ge a A Ral eee hes ieee ee ALP AN ee 29 8 5 Updating Device Diivenn je rani en aie aie na ai ai ii eie erst ete tenes eee 30 e Bo Pa WiIndOWS 200i ee eee es Sera soe es aes hia son cnc sees china ccs d chic ened cha eusde bin suede iu snutebagseedcnigenrdebinsredehte 30 82522 WINDOWS AP i inip tni ia a a a aa ai a aia a aa a i adie aden dee a 33 8 6 Notes for When Connected to External Device i cccetee
66. ag to continue when continuous interpolation stopped during driving because the driving speed is too fast to stack the next data VC TRUE Continue FALSE Not continue Can be omitted Default is FALSE VB True Continue False Not continue Return Value If the interpolation process has been successfully started in the background the return value is CIP_START If an error occurred before starting the interpolation process the return value is the following Error code errors before starting the interpolation m Normal start CIP_START Continuous interpolation has been successfully started in the background m Error code errors before starting the interpolation CIP_CNT_ERR The number of the specified data is out of range CIP_ALREADY_EXEC BP interpolation or continuous interpolation is already running CIP_THREAD_ERR Thread cannot be started CIP_MALLOC_ERR Memory cannot be allocated CIP_CMD_ERR The wrong command was specified After the interpolation process has been successfully started in the background WM_CIP_END message is sent to the specified window at the end of the interpolation The board number is passed to the first argument received in WM_CIP_END message received function and finishing status is passed to the second argument If the interpolation has been successfully completed the finishing status is CIP_END If an error occurred during the interpolation process the following Error code errors after starting the int
67. al Serial Bus controllers Fool te COREE Fe eh Eagen MC8043P Device Properties General Driver Details Resources LY MC8043P Device Resource settings Resource type Setting 0 Range C800 C80F QMO Range CCO0 CC3F Hino 18 Jse automatic settings Change Setting Conflicting device list No conflicts 28 NOVA electronics MC8043P M29 8 4 Board Removal 8 4 1 Windows 2000 XP 1 Uninstall the device driver using Device Manager Control Panel System Hardware tab Device Manager 2 Make sure that the PC is powered OFF and then remove the external cover and slot cover 3 Unscrew the mounting bracket 4 Remove the board by lifting steadily 5 Turn on the PC and start Windows 2000 XP 6 Make sure that MC8043P is deleted from Control Panel System Hardware tab Device Manager Device Manager Seles File Action View Help e gt MfS RAMi 4 TEST 7 Computer s Disk drives 2 Display adapters 2 DYD CD ROM drives E IDE ATAJATAPI controllers 3 gt Keyboards D Mice and other pointing devices te Modems 2 Monitors E9 Network adapters NoVA O eee Ports COM amp LPT MGR Processors Sound video and game controllers ge Storage volumes 9 System devices Universal Serial Bus controllers E 29 NOVA electronics MC8043P M30 8 5 Updating Device Driv
68. als for direction fixed pulse continuous drive Input Circuit Photo coupler IC built in integral filter E External Deceleration Instant Stop Signal INO 3 4 points for each axis INO encoder Z phase input Input Circuit Photo coupler IC built in integral filter INO high speed photo coupler input Enable disable and logical levels selectable and can be used as general input E Servo Motor Input Signal ALARM Alarm INPOS In Position Check Input Circuit Photo coupler IC built in integral filter Enable disable and logical levels selectable E General Output Signal OUT4 7 4 points for each axis General output drive status output can be switched Output Circuit 74LS06 output open collector output E Driving Status Signal Output ASND speed accelerating DSND speed decelerating CMPP position gt COMP CMPM position lt COMP Drive status and status registers readable E Limit Signals Input 2 points for each and side Input Circuit Photo coupler IC built in integral filter Logical levels and decelerating sudden stop selectable E Emergency Stop Signal Input EMGN 1 point for all axes Stop the drive pulse immediately for all axes and logical levels selectable by jumper on the board Input Circuit Photo coupler IC built in integral filter Electrical Characters Temperature Range for Driving 0 45 C No condensation Power Voltage for Driving 5V 5 Consumpti
69. anual nINOP N input signal is to stop drive pulse output by connecting to the Z phase output signal of an encoder or that of a servo motor driver Enable disable and logical level can be set in mode setting When enable is set and after this signal becomes active during driving drive pulse stops to output As described in chapter 3 5 if short circuiting 2 and 3 of JP3 the interface circuit for the encoder Z phase high speed photo coupler TLP115A is connected to nIN2 of MCX314As and automatic home search function of MCX314As can be used For details on automatic home search see chapter 2 5 of MCX314As user s manual MCX314As 5V m nECAP nECA PP IN nECAN nECBP nECB PMIN nECBN nINOP nINO nI NON i i i aloe nIN2 VEX 12 24V Switch by JP3 nIN2 a Encoder Input Signal Circuit As shown above encoder input signal circuit uses high speed photo coupler IC TLP115A Toshiba Each input signal can be directly connected to a differential line drive output As the figure below when n P N signal is H L n signal of MCX314As becomes Low and when is L H it becomes Hi The delay time from input to the signal pin of MCX314As is under 100nSEC so 11 NOVA electronics MC8043P M12 that the signal can count up to 4MHz in the case of 2 phase pulse input The connection example of an encoder input signal and a differential line drive output is shown as follows XECAP Q X x EC A KEGAN AM26LS31
70. ata into WR4 Output register vc void Nmc_WriteReg4 int No long wdata VB Sub Nmc_WriteReg4 ByVal No As Long ByVal wdata As Long VB NET Sub Nmc_WriteReg4 ByVal No As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board wdata Data to be written Return Value None Example VC Nmc_WriteReg4 No 0x0001 Hi level output for X axis general output OUTO VB Call Nmc_WriteReg4 No amp H0001 Nmc_WriteReg5 Write data into WR5 Interpolation mode register vc void Nmc_WriteReg5 int No long wdata VB Sub Nmc_WriteReg5 ByVal No As Long ByVal wdata As Long VB NET Sub Nmc_WriteReg5 ByVal No As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board wdata Data to be written Return Value None Example VC Nmc_WriteReg5 No 0x0024 Set the interpolation axis Master axis X Second axis Y Third axis Z VB Call Nmc_WriteReg5 No amp H0024 48 NOVA electronics MC8043P M49 Function Name Function and Content Nmc_WriteReg6 Write data into WR6 Write data register 1 vc void Nmc_WriteReg6 int No long wdata VB Sub Nmc_WriteReg6 ByVal No As Long ByVal wdata As Long VB NET Sub Nmc_WriteReg6 ByVal No As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board wdata Data to be written
71. ata is out of range BP_ALREADY_EXEC BP interpolation or continuous interpolation is already running BP_THREAD_ERR Thread cannot be started BP_MALLOC_ERR Memory cannot be allocated After the interpolation process has been successfully started in the background WM_BP_END message is sent to the specified window at the end of the interpolation The board number is passed to the first argument received in WM_BP_END message received function and finishing status is passed to the second argument If the interpolation has been successfully completed the finishing status is BP_END If an error occurred during the interpolation process the following Error code errors after starting the interpolation returns m Normal end BP_END BP interpolation has been successfully completed m Error code errors after starting the interpolation BP_STOP BP interpolation stopped during driving too fast to stack next data BP_USER_STOP The user aborted BP interpolation BP_DRIVE_ERR Error occurred in MC8043P during BP interpolation When the error status was set to RRO 67 NOVA electronics MC8043P M68 Function Name Function and Content Example VC VB BP interpolation data BP1P BP1M BP2P BP2M BP3P BP3M DATA_3BP Data3Bp 2 OxFF30 0 0 Ox84FF 0 OxAC35 OxAC35 0 OxC000 Ox36E7 0xC000 Ox3F3F Nmc_WriteReg5 No 0x24 Axis assignment for interpolation Master axis X Second axis
72. ate Driver To update the driver for this device A If the device fails after updating the driver roll WIESE sed back to the previously installed driver To uninstall the driver Advanced 9 Check the updated driver s file version in the following window Open Driver Version txt file and check the version described in the 2 Driver File Version and then check the updated version displayed in the following window Driver File Details MC8043P Device Driver files H WINDOWS Sy H WINDOWS System32 Drivers MC8043P sys stem32 MC8043P dil Provider NOVA electronics File version 2 0 0 0 Copyright Copyright C NOVA electronics 2004 2005 Digital Signer Not digitally signed 10 If multiple MC8043P boards are used update all the drivers of MC8043P Device under NOVA displayed in Device Manager 11 Restart your PC and the driver update will be finished 36 NOVA electronics MC8043P M37 8 6 Notes for When Connected to External Device It is important to note when MC8043P is operated by connecting to an external device Do not connect the output signal between output signals or to the output signal of the other device Otherwise breakdown may occur Do not short circuit the output signal to an external power Otherwise breakdown may occur For your own safety at malfunction make sure to connect over run limits of the external device Before driving a motor make sure
73. ation function is executed in the background so that the memory for interpolation data is allocated at the start of interpolation function and then the interpolation data specified by the user is copied Then when the interpolation process in the background is finished the memory will be released and the message will be sent to the user window Therefore while executing the following interpolation function in the background do not exit the application Then while executing the following interpolation function in the background do not execute the close handling CloseMC8043P or CloseAIIMC8043P If you want to stop the execution of interpolation function execute the interpolation stop function Nmc_IPStop and make sure to receive the stop message Nmc_2BPExec_BG Nmc_2CIPExec_BG Nmc_3BPExec_BG Nmc_3CIPExec_BG 4 While the interpolation function is executed and when the speed is too fast the interpolation driving may stop before setting the next data The following is the measured conditions relatively stably not to stop the interpolation When the application is switched during execution of interpolation function or when some event occurs or does not occur the stop speed is different In addition the stop speed is different in continuous interpolation depending on the one moving distance Measurement Result On the following conditions when the drive speed kept the speed below the interpolation did not stop When the drive speed is over
74. ays executed in DLL the use of this function isn t suitable if you want to execute other process by the application during this function is executing In this case the continuous interpolation function shouldn t be used and the user must make the source code of the continuous interpolation in the applications by referring to MCX314As user s manual Please see the chapter 2 4 6 The Acceleration Deceleration Control in Interpolation about the acceleration deceleration drive of continuous interpolation When using continuous interpolation function the initial speed should be set for 8 000 Don t change the initial speed during this function is executing In this case the fixed speed driving mode is applied in each segment m The BP Bit Pattern Interpolation When executing the BP interpolation of MC8043P please read the chapter 2 4 3 The Bit Pattern Interpolation of MCX314As user s manual carefully and execute the process described in the chapter in the application The BP interpolation functions 7 execute some of the process by DLL So they will be used to execute the process of the BP interpolation But there are some notes when using the BP interpolation functions Please note them 2 Nmc_2BPExec Nmc_3BPExec Nmc 2BPExec BG Nmc 3BPExec_BG Notes for when using the BP Interpolation Function The BP interpolation function writes the next BP data and the interpolation command and checks the error If the error occurs the
75. ce under NOVA and then click the General tab to display the window shown on the right below If the driver is correctly installed you can see This device is working properly in the Device status field Pee ajx Action view je gt er 2 ax O MC8043P Device General Driver Resources Computer Device type NOVA drives Manufacturer NOVA electronics Display adapters 23 DVD CD ROM drives Location PCI Slot 2 PCI bus 1 device 5 function 0 IDE ATA ATAPI controllers Dee alas Keyboards TA Mice and other pointing devices 3 Monitors BY Network adapters This device is working properly If you are having problems with this device click Troubleshooter to start the troubleshooter gt Ee Other devices zi a Ports COM amp LPT g Sound video and game controllers Troubleshooter 9 Storage volumes 2 System devices Device usage Universal Serial Bus controllers Use this device enable If Found New Hardware Wizard opens again the installation may not successfully be completed In this case remove the board according to steps at 8 4 and then reinstall from chapter 8 2 24 NOVA electronics MC8043P M25 After the installation is successfully completed check the resource settings I O address and I
76. continuous interpolation The number of data is 2 X Y Z axes if Ret CIPLEND AfxMessageBox Successful completion Return value is correct Dim Data3Cip 1 As DATA_3CIP 3 axis continuous interpolation data 3 axis continuous interpolation data setting Data3Cip 0 EndP1 1000 Data3Cip 0 EndP2 2000 Data3Cip 0 EndP3 3000 Data3Cip 0 Speed 0 Data3Cip 1 EndP1 2000 Data3Cip 1 EndP2 1000 Data3Cip 1 EndP3 3000 Data3Cip 1 Speed 0 Call Nmc_WriteReg5 No amp H24 Axis assignment for interpolation Master axis X Second axis Y Third axis Z Ret Nmc_3CIPExec No Data3Cip 0 2 amp H24 False False 3 axis continuous interpolation The number of data is 2 X Y Z axes If Ret CIP_END Then Return value is correct Call MsgBox Successful completion End If 72 NOVA electronics MC8043P M73 Function Name Function and Content Nmc_2CIPExec_BG Execute 2 axis continuous interpolation in the background using the specified interpolation data This function returns control right after the interpolation process started and executes the interpolation in the background WM_CIP_END message is sent to the specified window at the end of the interpolation and finishing status is passed vc DWORD Nmc_2CIPExec_BG HWND User_hWnd int No DATA_2CIP pData2Cip int DataCnt int IpAxis BOOL SpdChgFlg FALSE BOOL ContinueFlg FALSE VB Function Nmc_2CIPExec_BG ByVal Us
77. cording to need The hold off signal can be controlled by writing 0 1 into the D8 bit of WR3 register of MCX314As The figure shown below illustrates the connection example of MC8043P X axis and the stepper motor driver of Oriental Motor UPK series MC 8043P UPK series 1 0 Connector Driver CCW pulse Hold OFF nal DC24V Power Source XINI A5 Excitation timing TIMING YALARM A14 EN COM Notel Wire hold OFF excitation timing and over heat signals according to need The hold off signal can be controlled by writing 0 1 into the D8 bit of WR3 register of MCX314As The excitation timing signal can perform a home search by the mode setting of the WRI register DO 1 bit The over heat signal can perform an alarm function by the mode setting of the WR2 register D12 13 bit In addition excitation timing and over heat signals can directly read out the signal level through the RR4 5 registers Note2 When the circumstances are affected by strong noise or distance to the driver is long the twist pair shield cable shown above is recommended 15 NOVA electronics MC8043P M16 5 2 Connection Example for AC servo motor driver The figure shown below illustrates the connection example of MC8043P X axis and the AC servo motor driver of MINAS X series MC8043P MINAS X series 1 0 Connector CN IF Encoder A phase XECBPLAILY recon Li Encoder B phase i XI NOP XTNONLA20_ Encoder Z phase anD H A34 Servo on
78. ction Nmc_3BPExec_BG ByVal User_hWnd As Integer ByVal No As Integer ByRef pData3Bp As DATA_3BP ByVal DataCnt As Integer ByVal IpAxis As Integer ByVal ContinueFlg As Integer As Integer Input Parameter User_hWnd_ Window handle of the user application No Board number setting value of rotary switch 0 9 on the board pData3Bp Pointer to an array of DATA_3BP structures user defined type in VB Set the 3 axis BP interpolation data to DATA_3BP See footnote 3 for DATA_3BP DataCnt The number of 3 axis BP interpolation data Specify the number of the DATA_3BP structure user defined type array IpAxis Axis to execute interpolation Specify the same value as the setting value of WR5 DO D5 Axis assignment See footnote 4 ContinueFlg Set the flag to continue when BP interpolation stopped during driving because the driving speed is too fast to stack the next data VC TRUE Continue FALSE Not continue Can be omitted Default is FALSE VB True Continue False Not continue Return Value If the interpolation process has been successfully started in the background the return value is BP_START If an error occurred before starting the interpolation process the return value is the following Error code errors before starting the interpolation m Normal start BP_START BP interpolation has been successfully started in the background m Error code errors before starting the interpolation BP_CNT_ERR The number of the specified d
79. d then click Next Found New Hardware Wizard Install Hardware Device Drivers N 4 device driver is a software program that enables a hardware device to work with wy an operating system This wizard will complete the installation for this device a Other PCI Bridge Device 4 device driver is a software program that makes a hardware device work Windows needs driver files for your new device To locate driver files and complete the installation click Next What do you want the wizard to do ci Display a list of the known drivers for this device so that can choose a specific driver lt Back Cancel 22 NOVA electronics MC8043P M23 8 Select Specify a location then click Next Found New Hardware Wizard Locate Driver Files Na Where do you want Windows to search for driver files wy Search for driver files for the following hardware device op Other PCI Bridge Device The wizard searches for suitable drivers in its driver database on your computer and in any of the following optional search locations that you specify To start the search click Nest If you are searching on a floppy disk or CD ROM drive insert the floppy disk or CD before clicking Next Optional search locations re T CD ROM drives IV Specify a location Tl Microsoft Windows Update cma 9 When installing the driver from CD ROM insert CD ROM into CD drive then wait until CD ROM will be recognized by
80. d number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VC Nmc_Acc No AXIS_Y 100 Set 100 to acceleration Y axis VB Call Nmc_Acc No AXIS_Y 100 Nmc_Dec Set deceleration vc void Nmc_Dec int No int Axis long wdata VB Sub Nmc_Dec ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_Dec ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VC Nmc_Dec No AXIS_Z 100 Set 100 to deceleration Z axis VB Call Nmc_Dec No AXIS_Z 100 52 NOVA electronics MC8043P M53 Function Name Function and Content Nmc_StartSpd Set initial speed vc void Nmc_StartSpd int No int Axis long wdata VB Sub Nmc_StartSpd ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_StartSpd ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footn
81. dapter XEXPM e XEXOP direction driving 1 I l MADTEG MP If RNR EST RT A RS e O EA be ef ety l l eat Y axis 1 0 Interface i i l ia same as X axis l l n E E E E E E l l l l l l Bg Z axis 1 0 Interface i tia INTN same as X axis i i 1 i i 1 1 al U axis 1 0 Interface ie same as X axis Use Bee cece Bee ee cet EE eases eeceened EEPROM 2 NM93CS66 EMGN Photo Coupler EMG Emergency stop or equivalent F Itipl 1 Encoder Z phase input signal can be input to nIN2 of MCX314As by switching jumper or multiple 2 Emergency stop input signal can change the logic by switching jumper Address SW 3 All the input signals nECA B excluded of 1 0 interface are set to MCX314As built in integral filter 7 512usec due to Windows device driver dafault setting MC8043P Circuit Block Diagram NOVA electronics MC8043P M2 1 1 MCX314As Functional Restriction MC8043P does not support the following MCX314As input output signals due to the board area and the number of I O connector pins BUSYN output signal EXPLSN input signal SCLK output signal nDRIVE DCC output signal nOUT3 0 general output signal 4 points of each axis nNOUT7 4 are used as output through buffer 1 2 Difference from MC8041P MC8041P is a PCI board equipped with MCX314 and MC8043P is a PCI board equipped with MCX314As instead of MCX314 Concerning I O interface signal names and pin assignments are completely the same as MC8041P However the following a
82. e best driver found will be installed C Search removable media floppy CD ROM Include this location in the search D ADriver er 2 0 0 Browse E Don t search will choose the driver to install Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware 8 After the installation is successfully completed the following dialog box opens then click Finish Found New Hardware Wizard Completing the Found New Hardware Wizard The wizard has finished installing the software for MC8043P Device Click Finish to close the wizard 27 NOVA electronics 9 The installation has finished Check the installation is successfully completed by the following steps Control Panel System Hardware tab Device Manager shown on the left below double click MC8043P Device under NOVA and then click the General tab to display the window shown on the right below If the driver is correctly installed you can see This device is working properly in the Device status field Device Manager DER Fie Action view Help e gt mM f8 RARI a Computer ge Disk drives 2 Display adapters 4 DYD CD ROM drives jy IDE ATAJATAPI controllers Keyboards 10 Mice and other pointing devices k gt Modems 32 Monitors l E Network adapters Nova gt IEEE Y Por
83. e set Return Value None Example VC Nmc_Ep No AXIS_ALL 0 Set 0 to real position counter of all axes VB Call Nmc_Ep No AXIS_ALL 0 55 NOVA electronics MC8043P M56 Function Name Function and Content Nmc_CompP Set COMP register vc void Nmc_CompP int No int Axis long wdata VB Sub Nmc_CompP ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_CompP ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VC Nmc_CompP No AXIS_X 50000 Set 50000 to COMP register X axis VB Call Nmc_CompP No AXIS_X 50000 Nmc_CompM Set COMP register vc void Nmc_CompM int No int Axis long wdata VB Sub Nmc_CompM ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_CompM ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VC Nmc_CompM No AXIS_X 50000 Set 50000 to COMP register X axis VB Call Nmc_CompM
84. eStatus No AXIS_X 0 Then When X axis has finished driving Call MsgBox X axis has finished driving Else Call MsgBox X axis is driving End If Nmc_GetCNextStatus Read the status of ready signal for writing of continuous interpolation Read the status of the bit CNEXT of RRO The user can use to check whether the signal for the writing of continuous interpolation is ready or not during continuous interpolation execution ve int Nmc_GetCNextStatus int No VB Function Nmc_GetCNextStatus ByVal No As Long As Long VB NET Function Nmc_GetCNextStatus ByVal No As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Return Value If the signal for the writing of continuous interpolation is ready the return value is nonzero If the signal for the writing of continuous interpolation is not ready the return value is 0 Example VC _ if Nmc_GetCNextStatus No 0 When the signal for the writing is ready AfxMessageBox The signal for the writing of continuous interpolation is ready else AfxMessageBox The signal for the writing of continuous interpolation is not ready VB If Nmc_GetCNextStatus No lt gt 0 Then When the signal for the writing is ready Call MsgBox The signal for the writing of continuous interpolation is ready Else Call MsgBox The signal for the writing of continuous interpolation is not ready End If 60 NOVA electronics
85. earch Step 4 high speed offset drive Enable Disable of each step and search direction selectable E Synchronous action Activation factor Action Transition to position counter gt COMP Transition to position counter lt COMP Trasition to position counter lt COMP Transition to position counter gt COMP start of driving termination of driving IN3 signalt IN3 signal LP read command activation command Start of fixed pulse drive start of continuous pulse drive drive decelerating stop drive instant stop saving position counter values setting position counter values setting an output pulse number setting a drive speed and interrupt Any action of other axes can be activated from the factor of the own axis E Interrupt Interpolations Excluded The factors of occurring interrupt drive pulse outputting Start finish of a constant speed drive during the acceleration deceleration driving end of the driving Transition to the volume of position counter 2 the volume of COMP Transition to the volume of position counter lt the volume of COMP Transition to the volume of position counter 2 the volume of COMP Transition to the volume of position counter lt the volume of COMP terminating of automatic home search synchronous action Enable disable for these factors selectable E External Signal for Driving EXPP and EXPM sign
86. ee eee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeteneneeties 37 9 PROGFAMUIMING sirieni a aa i 38 9 1 Software Specifications ccccccccccsceceeeceeceeeeeeeeeeeeeeeaaeeaeeeeeeeeeeeaaeaaeeeeeeeeeeeaaaaeeeeeeeeeesaaaeeeeeeeees 38 9 1 1 Operating ENvironmentsi2 i a Sa ee A ee ee es vd ea 38 9 1 2 Program Configuration File cece eee EEE EEE EERE EERE EERE EEE E REET EEE E EERE EEE E EEE E EERE EEE EEE EEE EEE EEE EEE 38 9 1 3 API MC8043P Driver Function cccccccceeeeecceeeeeeceeeeeeeeeeeeeaaeeeseaeeeesecaeeeeecaeeeseneaeeeesenaeeeseeueeeeeeeaeees 40 9 1 4 API Supporting Function used by MC8041P Driver 0 2 cece cette eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeetenes 90 9 2 Contents of the Accessory Software rr rrr iirniieniiitinitinenntets 97 9 3 Development Procedure ccccceeeeceeeececceeeeeeeeeeeeeeceaaeeaeeeeeeeeeaaaaaaaeeeeeeeeeeaaaaeeeeeeseesaaaceeeeeeees 101 9 3 1 When developing applications with VC VC 6 0 VC NET 2003 101 9 3 2 When developing applications With VB6 0 cee eee e eee tee Rete eee e ee tee eeeeeeeeeeeeeeeeeteetteeetees 103 9 3 3 When developing applications with VB NET 2003 0 0 e eee eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeas 103 9 4 Notes on Programming 10 Special ons ws rie 22e ssincecaneaw ieee acecne mau cioe Ieee 106 NOVA electronics MC8043P M1 1 Outline MC8043P is a PCI bus compliant PC AT compatible circuit board equipped with 4 axes motion control IC
87. en programming in VB6 0 and using multiple MC8043P boards the following function can be used Function Name Function and Content OpenCard_N Start MC8043P Input Parameter ByVal As Long Board number setting value of rotary switch 0 9 on the board 1 0 amp Fixed Return Value As Long If the function succeeds the driver handle returns If the function fails the return value is NULL lt Example gt status OpenCard_N 1 0 amp When opening the board 0 set 1 to the first argument The second argument must be fixed to 0 amp CloseCard_N Terminate MC8043P Input Parameter ByVal As Long Board number setting value of rotary switch 0 9 on the board 1 Return Value As Long If the function succeeds the return value is nonzero If the function fails the return value is 0 lt Example gt status CloseCard_N 1 Close the board 0 OutW_N Write 1 word 16 bit into output port Input Parameter ByVal As Long Board number setting value of rotary switch 0 9 on the board 1 ByVal As Integer Write register number WRO WR7 ByVal As Long Data to be written Return Value None lt Example gt Call OutW_N 1 WRO amp H8000 Soft reset the board Note The write register numbers WRO WR7 are defined in the MC8043P_DLL bas file InW_N Read out 1 word 16 bit from input port Input Parameter ByVal As Long Board number setting value of rotary switch 0 9 on the board 1 ByVal As Integer Read register numb
88. er To update the driver follow the steps below Hereinafter the installation procedure will be described for each OS 8 5 1 Windows 2000 1 Open Control Panel System Hardware tab Device Manager shown on the left below double click MC8043P Device under NOVA and then click the Driver tab to display the window shown on the right below 2 Click Update Driver and then click Next Action view General Driver Resources KEAC IAE aa MC8043P Device TEST2 m Computer Driver Provider NOVA electronics H Disk drives Driver Date Not available Display adapters DVD CD ROM drives Driver Version 2 0 0 0 4 IDE ATA ATAPI controllers Digital Signer Not digitally signed 83 Keyboards Pe Py 3 Mice and other painting devices To view details about the driver files loaded for this device click Driver Monitors Details To uninstall the driver files for this device click Uninstall To update Network adapters the driver files for this device click Update Driver gt Nova gt Teka E Other devices aF Ports COM amp LPT g Sound video and game controllers 9 Storage volumes 2 System devices Universal Serial Bus controllers Driver Details Uninstall Update Driver ul OK Cancel 3 Select Display a list of the known drivers
89. er RRO RR7 Return Value As Long 1 word read out from input port lt Example gt data InW_N 1 RRO Read out the read register RRO Note The read register numbers RRO RR7 are defined in the MC8043P_DLL bas file CloseCard_all Terminate all the MC8043P Input Parameter None Return Value As Long If the function succeeds the return value is nonzero If the function fails the return value is 0 lt Example gt status CloseCard_all 93 NOVA electronics MC8043P M94 9 1 4 5 VB NET 2003 When one MC8043P board is used When programming in VB NET 2003 and using one MC8043P board the following function can be used Before using the following function set 0 to the value of rotary switch on the board Function Name Function and Content OpenCard Start MC8043P Perform to MC8043P whose board number setting value of rotary switch on the board is 0 Input Parameter 0 Fixed Return Value As Integer If the function succeeds the driver handle returns If the function fails the return value is NULL lt Example gt status OpenCard 0 0 is fixed Open the board 0 CloseCard Terminate MC8043P Perform to MC8043P whose board number setting value of rotary switch on the board is 0 Input Parameter None Return Value As Integer If the function succeeds the return value is nonzero If the function fails the return value is 0 lt Example gt status CloseCard Clo
90. er 6 bit of 16 bit data D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 DO 0 0 0 0 0 0 0 0 0 0 AX31 AX30 AX21 AX20 AX11 AX10 Third axis Second axis First axis Description of each bit D1 0 AX11 10 Specify the first axis master axis for interpolation driving Axis codes are as follows Axis Code Binary X 00 Y 01 Z 10 U 11 Example of the first axis X Second axis Y Third axis Z D5 D4 D3 D2 DI DO 1 0 0 1 0 0 D3 2 AX21 20 Specify the second axis using the code in the table above for interpolation driving D5 4 AX31 30 Specify the third axis using the code in the table above for 3 axis interpolation driving This is not used in 2 axis interpolation driving so it doesn t matter to set any code 5 About the speed change when continuous interpolation function is executed Continuous interpolation function can change the speed during interpolation driving The user can set the speed to each segment To change the speed during interpolation driving set TRUE True to the function parameter SpdChgFlg How to change the speed for each segment Set the speed of each segment to the Speed of DATA_2CIP or the Speed of DATA_3CIP e When set the different speed from the previous segment set 1 8000 When set the same speed as the previous segment set 0 About the timing of changing the speed When the Speed of DATA_2CIP or the Speed of DAT
91. er of MCX314As becomes the setting of signal delay time 512 u sec due to the default setting of Windows device driver provided by NOVA electronics This signal delay time can be changed for circumstances of system noise For more details see chapter 2 8 and 6 16 of MCX314As user s manual Ss te o VEX 12 24V 10K 33K nLMTP XAA zgzILP281 or equivalent ONM 5V Bitin fit F nLMTM re nLMT Delay time 512 u SEC default 4 Over Run Limit Input Signal Circuit The connection example of an over run limit input signal and a photo microsensor is shown below When D3 bit of X axis mode register 2 XWR2 is set to 0 the mode at reset limit function becomes active at the light interception MC8043P KER DC24V Power EE SX670 Omron XLNT X axis mode register 2 D3 bit 0 Active at the light interception Connection Example of Over Run Limit Input Signal and Photo Microsensor When long wiring is needed use the shield cable NOVA electronics MC8043P M10 3 5 Decelerating Stop Instant Stop Input Signal nIN1 nIN2 nIN3 Three input signals to stop drive pulse output in deceleration or immediately MCX314As has four signals IN3 INO for each axis Short circuiting 1 and 2 of the jumper pin JP3 default setting the interface circuit for an encoder Z phase high speed photo coupler TLP115A is connected to nINO of MCX314As nIN1 nIN2 nIN3 signals are used as home or near home input signals If
92. er_hWnd As Long ByVal No As Long ByRef pData2Cip As DATA_2CIP ByVal DataCnt As Long ByVal IpAxis As Long ByVal SpdChgFlg As Long ByVal ContinueFlg As Long As Long VB NET Function Nmc_2CIPExec_BG ByVal User_hWnd As Integer ByVal No As Integer ByRef pData2Cip As DATA_2CIP ByVal DataCnt As Integer ByVal IpAxis As Integer ByVal SpdChgFlg As Integer ByVal ContinueFlg As Integer As Integer Input Parameter User_hWnd_ Window handle of the user application No Board number setting value of rotary switch 0 9 on the board pData2Cip Pointer to an array of DATA_2CIP structures user defined type in VB Set the 2 axis continuous interpolation data to DATA_2CIP See footnote 3 for DATA_2CIP DataCnt The number of 2 axis continuous interpolation data Specify the number of the DATA_2CIP structure user defined type array IpAxis Axis to execute interpolation Specify the same value as the setting value of WR5 DO D5 Axis assignment See footnote 4 SpdChgFlg Set the flag to change the speed during the interpolation process If you change the speed See footnote 5 VC TRUE Change FALSE Not change Can be omitted Default is FALSE VB True Change False Not change When selecting Change Refers to the setting value of DATA_2CIP Speed Set 1 8000 to Speed Changes to the setting speed Set 0 to Speed gt Not change the speed When selecting Not change Not refers to the setting value of DATA_2CIP Speed ContinueFlg Set the fl
93. erpolation returns m Normal end CIP_END Continuous interpolation has been successfully completed m Error code errors after starting the interpolation CIP_STOP Continuous interpolation stopped during driving too fast to set next data CIP_USER_STOP The user aborted continuous interpolation CIP_DRIVE_ERR Error occurred in MC8043P during continuous interpolation When the error status was set to RRO 73s NOVA electronics MC8043P M74 Function Name Function and Content Example VC VB 2 axis continuous interpolation data Data Command Speed Finishing point 1 Finishing point 2 Center point 1 Center point 2 DATA_2CIP Data2Cip 2 CMD_IP_2ST 0 4500 0 0 0 2 axis linear interpolation CMD_IP_CCW 0 1500 1500 0 1500 CCW circular interpolation Nmc_WriteReg5 No 0x04 Axis assignment for interpolation Master axis X Second axis Y Ret Nmc_2CIPExec_BG hWnd No Data2Cip 2 0x04 Execute 2 axis continuous interpolation The number of data is 2 X Y axes if Ret CIP_START AfxMessageBox Interpolation has started Return value is correct Interpolation has started BEGIN_MESSAGE_MAP CMC_SAMPLEDlg CDialog WM_CIP_END message received function settting ON_MESSAGE WM_CIP_END OnMsg_CIP END_MESSAGE_MAP WM_CIP_END message received function afx_msg LRESULT CMC_SAMPLEDlg OnMsg_CIP WPARAM BoardNo LPARAM Status if Status CIP_LEND
94. erpolation has been successfully completed m Error code BP_CNT_ERR The number of the specified data is out of range BP_ALREADY_EXEC BP interpolation or continuous interpolation is already running BP_STOP BP interpolation stopped during driving too fast to stack next data BP_USER_STOP The user aborted BP interpolation BP_DRIVE_ERR Error occurred in MC8043P during BP interpolation When the error status was set to RRO Example VC BP interpolation data BP1P BP1M BP2P BP2M DATA_2BP Data2Bp 2 0x0000 Ox2BFF OxFFD4 0x0000 OxF6FE 0x0000 0x000F 0x3FCO0 Nmc_WriteReg5 No 0x04 Axis assignment for interpolation Master axis X Second axis Y Ret Nmc_2BPExec No Data2Bp 2 0x04 Execute 2 axis BP interpolation The number of data is 2 X Y axes if Ret BP_END AfxMessageBox Successful completion Return value is correct VB Dim Data2Bp 1 As DATA_2BP 2 axis BP interpolation data 2 axis BP interpolation data setting Data2Bp 0 Bp1p amp HO Data2Bp 0 Bp1m amp H2BFF Data2Bp 0 Bp2p amp HFFD4 Data2Bp 0 Bp2m amp HO Data2Bp 1 Bp1p amp HF6FE Data2Bp 1 Bp1m amp HO Data2Bp 1 Bp2p amp HF Data2Bp 1 Bp2m amp H3FCO Call Nmc_WriteReg5 No amp H4 Axis assignment for interpolation Master axis X Second axis Y Ret Nmc_2BPExec No Data2Bp 0 2 amp H4 False Execute 2 axis BP interpolation The number of data is 2 X Y axes If Ret BP_END Then Return value i
95. et data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VC Nmc_Pulse No AXIS_X 2000 Set 2000 to output pulse number X axis Nmc_Pulse No AXIS_Y 300 Set 300 to interpolation finish point Y axis Nmc_Pulse No AXIS_Z 400 Set 400 to interpolation finish point Z axis 53 NOVA electronics MC8043P M54 Function Name Function and Content Nmc_Pulse_VB Set output pulse number or interpolation finish point VB only The number of output pulses indicates the total number of pulses that are output in fixed pulse driving For linear and circular interpolation driving set the finish point of each axis The finish point should be set by relative numbers vc cannot be used VB Sub Nmc_Pulse_VB ByVal No As Long ByVal Axis As Long ByVal wdata As Double VB NET Sub Nmc_Pulse_VB ByVal No As Integer ByVal Axis As Integer ByVal wdata As Double Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VB Call Nmc_Pulse_VB No AXIS_X 2000 Set 2000 to output pulse number X axis Call Nmc_Pulse_VB No AXIS_Y 300 Set 300 to interpolation finish point Y axis Call Nmc_Pulse_VB No AXIS_Z
96. f the lower cable to the left when Pin 1 mark A of the connector is placed in the upper right Connector type Board side FX2B 100P 1 27DS Hirose Cable side FX2B 100S 1 27R Hirose Pin Signal I O Contents Chapter A1 VEX External Power DC12 24V 3 10 A2 EMG Input Emergency Stop All axes 3 9 A3 XLMT Input X axis Limit in direction 3 4 A4 XLMT Input X axis Limit in direction 3 4 A5 XIN1 Input X axis Decelerating Stop Instant Stop 3 5 A6 XIN2 Input X axis Decelerating Stop Instant Stop 3 5 A7 XIN3 Input X axis Decelerating Stop Instant Stop 3 5 A8 YLMT Input Y axis Limit in direction 3 4 A9 YLMT Input Y axis Limit in direction 3 4 A10 YIN1 Input Y axis Decelerating Stop Instant Stop 3 5 A11 YIN2 Input Y axis Decelerating Stop Instant Stop 3 5 A12 YIN3 Input Y axis Decelerating Stop Instant Stop 3 5 A13 XINPOS Input X axis Servo Inposition 3 6 A14 XALARM Input X axis Servo Alarm 3 6 A15 XECAP Input X axis Encoder A phase 3 7 A16 XECAN Input X axis Encoder A phase 3 7 A17 XECBP Input X axis Encoder B phase 3 7 A18 XECBN Input X axis Encoder B phase 3 7 A19 XINOP Input X axis Encoder Z phase 3 7 A20 XINON Input X axis Encoder Z phase 3 7 A21 YINPOS Input Y axis Servo Inposition 3 6 A22 YALARM Input Y axis Servo Alarm 3 6 A23 YECAP Input Y axis Encoder A phase 3 7 A24 YECAN Input Y axis Encoder A phase 3 7 A25 YECBP Input Y axis Encoder B p
97. file function declaration definition Project workspace for VC sample program VC6 0 only Sample A executable file Sample program B MC8043P DLL Library file MC8043P DLL Header file function declaration definition Project workspace for VC sample program VC6 0 only Sample B executable file Sample program C MC8043P DLL Library file MC8043P DLL Header file function declaration definition Project workspace for VC sample program VC6 0 only Sample C executable file Sample program D MC8043P DLL Library file MC8043P DLL Header file function declaration definition Project workspace for VC sample program VC6 0 only Sample D executable file Sample program E Application class member function Dialog class member function Application class declaration Dialog class declaration MC8043P Control function sample MC8043P Control function declaration MC8043P DLL Library file MC8043P DLL Header file function declaration definition Project workspace for VC sample program VC6 0 only Executable file 99 NOVA electronics Sample F MC_Sample2 cpp MC_Sample2Dlg cpp MC_Sample2 H MC_Sample2Dlg H MC8043P cpp MC8043P H MC8043P LIB MC8043P_DLL H MC_Sample2 dsw Sample bmp exe VCSampleF exe Sample G MC_SAMPLE cpp MC_SAMPLEDIlg cpp MC_SAMPLE H MC_SAMPLEDIlg H MC8043P LIB MC8043P_DLL H MC_SAMPLE dsw e
98. following Error code errors before starting the interpolation m Normal start CIP_START Continuous interpolation has been successfully started in the background m Error code errors before starting the interpolation CIP_CNT_ERR The number of the specified data is out of range CIP_ALREADY_EXEC BP interpolation or continuous interpolation is already running CIP_THREAD_ERR Thread cannot be started CIP_MALLOC_ERR Memory cannot be allocated CIP_CMD_ERR The wrong command was specified After the interpolation process has been successfully started in the background WM_CIP_END message is sent to the specified window at the end of the interpolation The board number is passed to the first argument received in WM_CIP_END message received function and finishing status is passed to the second argument If the interpolation has been successfully completed the finishing status is CIP_END If an error occurred during the interpolation process the following Error code errors after starting the interpolation returns m Normal end CIP_END Continuous interpolation has been successfully completed m Error code errors after starting the interpolation CIP_STOP Continuous interpolation stopped during driving too fast to set next data CIP_USER_STOP The user aborted continuous interpolation CIP_DRIVE_ERR Error occurred in MC8043P during continuous interpolation When the error status was set to RRO 75 NOVA electronics MC804
99. function is applied WM_CIP_END message received function Protected Overrides Sub WndProc ByRef m As Message If m Msg WM_CIP_END Then Continuous interpolation finishing message If Param CIP_END Then Return value is correct Interpolation has finished Call MsgBox Interpolation has been successfully completed End If End If MyBase WndProc m End Sub 74 NOVA electronics MC8043P M75 Function Name Function and Content Nmc_3CIPExec_BG Execute 3 axis continuous interpolation in the background using the specified interpolation data This function returns control right after the interpolation process started and executes the interpolation in the background WM_CIP_END message is sent to the specified window at the end of the interpolation and finishing status is passed vc DWORD Nmc_3CIPExec_BG HWND User_hWnd int No DATA_3CIP pData3Cip int DataCnt int IpAxis BOOL SpdChgFlg FALSE BOOL ContinueFlg FALSE VB Function Nmc_3CIPExec_BG ByVal User_hWnd As Long ByVal No As Long ByRef pData3Cip As DATA_3CIP ByVal DataCnt As Long ByVal IpAxis As Long ByVal SpdChgFlg As Long ByVal ContinueFlg As Long As Long VB NET Function Nmc_3CIPExec_BG ByVal User_hWnd As Integer ByVal No As Integer ByRef pData3Cip As DATA_3CIP ByVal DataCnt As Integer ByVal IpAxis As Integer ByVal SpdChgFlg As Integer ByVal ContinueFlg As Integer As Integer Input Parameter User_hWnd_ Window handle of the user appl
100. function returns If not it will check whether the stack counter becomes 2 or less check the bit D14 13 of RRO When it becomes 2 or less it will write the next BP data This function repeats the process until the BP interpolation is completed Because the loops that check the error and check the stack counter are always executed in DLL the use of this function isn t suitable if you want to execute other process by the application during this function is executing In this case the BP interpolation function shouldn t be used and the user must make the source code of the BP interpolation in the applications by referring to MCX314As user s manual Please see chapter 2 4 6 The Acceleration Deceleration Control in Interpolation about the acceleration deceleration drive of BP interpolation 86 NOVA electronics MC8043P M87 m Notes for Use of Interpolation Function 1 Concerning the following interpolation function the user can execute only one interpolation function at once While executing the interpolation function the other interpolation function cannot be executed If executed an error will return Nmc_2BPExec Nmc_2BPExec_BG Nmc_2CIPExec Nmc_2CIPExec_BG Nmc_3BPExec Nmc_3BPExec_BG Nmc_3CIPExec Nmc_3CIPExec_BG 2 While executing the above interpolation function do not perform the following operation Execution of the interpolation command 30h 3Dh Change of WR5 interpolation mode register 3 The following interpol
101. ge Interpolation Speed Interpolation Accuracy E Circular Interpolation Interpolation Range Interpolation Speed Interpolation Accuracy E 2 axis 3 axis Bit Pattern Interpolation Interpolation Speed E Related functions of Interpolation 4 axes 16 bit 16 byte Address is determined by PnP IRQ Connected by PnP Each axis 2 147 483 646 2 147 483 646 1PPS 4MPPS 0 5LSB Within the range of whole interpolation Each axis 2 147 483 646 2 147 483 646 1PPS 4MPPS 1 LSB Within the range of whole interpolation 1PPS 4MPPS Dependent on CPU data writing time Can select any axis Continuous interpolation Single step interpolation Command Constant vector speed Common Specifications of Each Axis E Drive Pulses Output Pulse Output Circuit Pulse Output Speed Pulse Output Speed Accuracy Speed Multiplier S curve Jerk Accelerating Decelerating Speed Initial Speed Drive Speed Output pulse Number Speed Curve Index Drive Deceleration Mode Differential line drive AM26C31 output 1PPS 4MPPS 0 1 according to the setting speed 1 500 954 62 5x10 PPS SEC Multiple 1 477 x 10 31 25 x 10 PPS SEC Multiple 500 125 1 x 10 PPS SEC Multiple 1 62 5x10 500 x 10 PPS SEC Multiple 500 1 8 000PPS Multiple 1 500PPS 4x10 PPS Multiple 500 1 8 000PPS Multiple 1 500PPS 4x10 PPS 0 4 294 967 295 unli
102. gister RRO VB data InpMC8043P 0 MCX314_RR0O Note VC Regarding reading the RR3 register data refer to ReadEventMC8043P function 43 NOVA electronics MC8043P M44 Function Name Function and Content SetEventMC8043P Set user function to handle an interrupt By executing this function the user function is called when an interrupt occurs and then one specified argument is passed This user function is run as one thread vc BOOL SetEventMC8043P int No LPTHREAD_START_ROUTINE UserThread LPVOID IpParameter VB cannot be used VB NET cannot be used Input Parameter No Board number setting value of rotary switch 0 9 on the board UserThread Pointer to the user function to be called when an interrupt occurs IpParameter Assign one argument to pass to user function thread Set the available pointer for the thread When not using the argument set NULL Return Value If the function succeeds the return value is TRUE If the function fails the return value is FALSE Example VC When the board number is 0 status SetEventMC8043P 0 LPTHREAD_START_ROUTINE MC8043P_EventProc0 NULL Set the function address and argument Nmc_WriteReg1 0 AXIS_ALL 0x8000 Interrupt occurs at the stop All axes When the board number is 1 status SetEventMC8043P 1 LPTHREAD_START_ROUTINE MC8043P_EventProc1 lpParameter Set the function address and argument Nmc_WriteReg1 1 AXIS_ALL 0x8000 Interrupt occ
103. hase 3 7 NOVA electronics Pin Signal I O Contents Chapter A26 YECBN Input Y axis Encoder B phase 3 7 A27 YINOP Input Y axis Encoder Z phase 3 7 A28 YINON Input Y axis Encoder Z phase 3 7 A29 XEXOP Input X axis Driving in direction 3 8 A30 XEXOP Input X axis Driving in direction 3 8 A31 YEXOP Input Y axis Driving in direction 3 8 A32 YEXOP Input Y axis Driving in direction 3 8 A33 GND Internal Circuit GND A34 XOUT4 Output X axis General Output 3 3 A35 XOUT5 Output X axis General Output 3 3 A36 XOUT6 Output X axis General Output 3 3 A37 XOUT7 Output X axis General Output 3 3 A38 XP P Output X axis Drive Pulse in direction 3 2 A39 XP N Output X axis Drive Pulse in direction 3 2 A40 XP P Output X axis Drive Pulse in direction 3 2 A41 XP N Output X axis Drive Pulse in direction 3 2 A42 GND Internal Circuit GND A43 YOUT4 Output Y axis General Output 3 3 A44 YOUT5 Output Y axis General Output 3 3 A45 YOUT6 Output Y axis General Output 3 3 A46 YOUT7 Output Y axis General Output 3 3 A47 YP P Output Y axis Drive Pulse in direction 3 2 A48 YP N Output Y axis Drive Pulse in direction 3 2 A49 YP P Output Y axis Drive Pulse in direction 3 2 A50 YP N Output Y axis Drive Pulse in direction 3 2 Pin Signal I O Contents
104. i Deviation counter clear BB Alarm reset 5 6 az XALAR MAL Servo alarm XINPO SHA Positioning completion Limit Al a CCW direction er ES eee ee eee A5 Home aa A6 Near home EE SX670 Omron Notel Set the mode of MINAS driver control to the position control mode and the pulse form to CW CCW pulse mode Do not set the command pulse form to Pulse Sign mode because the lack of t6 time occurs Note2 Use encoder A B phase signals when the user counts a real position counter in MCX314As If the real position data is not necessary no need to connect them For other signals connect them according to need Note3 When the circumstances are affected by strong noise or the distance to the driver is long the twist pair shield cable shown above is recommended 16 NOVA electronics MC8043P M17 6 Input Output Signals Timing 6 1 Reset 5V jee TRESET nP P Low nP N Hi OFF nOUT4 7 EROE Read Write to this board Disable Enable Drive pulse output signals nP P nP N and general output signals nOUT4 7 are determined within a maximum of 250nSEC after of the target reset signal TRESET of APIC21 ADTEC Writing Reading to this board can be performed after 500nSEC from 7 of the target reset signal TRESET 6 2 Independent Driving 1 OW Writing of drive command I lt nP P First Pulse Second Pulsd roia i
105. ication No Board number setting value of rotary switch 0 9 on the board pData3Cip Pointer to an array of DATA_3CIP structures user defined type in VB Set the 3 axis continuous interpolation data to DATA_3CIP See footnote 3 for DATA_3CIP DataCnt The number of 3 axis continuous interpolation data Specify the number of the DATA_3CIP structure user defined type array IpAxis Axis to execute interpolation Specify the same value as the setting value of WR5 DO D5 Axis assignment See footnote 4 SpdChgFlg Set the flag to change the speed during the interpolation process If you change the speed See footnote 5 VC TRUE Change FALSE Not change Can be omitted Default is FALSE VB True Change False Not change When selecting Change Refers to the setting value of DATA_3CIP Speed Set 1 8000 to Speed Changes to the setting speed Set 0 to Speed gt Not change the speed When selecting Not change Not refers to the setting value of DATA_3CIP Speed ContinueFlg Set the flag to continue when continuous interpolation stopped during driving because the driving speed is too fast to stack the next data VC TRUE Continue FALSE Not continue Can be omitted Default is FALSE VB True Continue False Not continue Return Value If the interpolation process has been successfully started in the background the return value is CIP_START If an error occurred before starting the interpolation process the return value is the
106. in 6 5 Instant Stop Timing E Instant Stop by External Signal EMG nLMT nIN3 2 1 Valid Level When an instant stop signal becomes valid level during driving the driving stops after photo coupler delay time 100 u sec max the delay time of IC built in integral filter 512 u sec default 1 drive pulse E Instant Stop by Command Writing of stop command When stop command is written during driving the driving stops after a maximum of 1 drive pulse 18 NOVA electronics MC8043P M19 6 6 Decelerating Stop Timing E Decelerating Stop by External Signal 1 Valid Level wae E es ee ee ee When an external decelerating stop signal becomes valid level during driving the driving starts deceleration after photo coupler delay time 100 u sec max the delay time of IC built in integral filter 512 u sec default 2 drive pulses E Decelerating Stop by Command OW Writing of decelerating stop command eet emis Sper E e eh When decelerating stop command is written during driving the driving starts deceleration after a maximum of 2 drive pulses 19 NOVA electronics MC8043P M20 7 Board Dimensions Unit mm 1 0 Connector JP1 Select active logical level for emergency stop signal EMG 1 2 short circuit default When the signal is short circuited with GND it becomes active 2 3 short c
107. interpolation process ends so it is recommended to create a thread in the application and call from the thread vc DWORD Nmc_2BPExec int No DATA_2BP pData2Bp int DataCnt int IpAxis BOOL ContinueFlg FALSE VB Function Nmc_2BPExec ByVal No As Long ByRef pData2Bp As DATA_2BP ByVal DataCnt As Long ByVal IpAxis As Long ByVal ContinueFlg As Long As Long VB NET Function Nmc_2BPExec ByVal No As Integer ByRef pData2Bp As DATA_2BP ByVal DataCnt As Integer ByVal IpAxis As Integer ByVal ContinueFlg As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board pData2Bp Pointer to an array of DATA_2BP structures user defined type in VB Set the 2 axis BP interpolation data to DATA_2BP See footnote 3 for DATA_2BP DataCnt The number of 2 axis BP interpolation data Specify the number of the DATA_2BP structure user defined type array IpAxis Axis to execute interpolation Specify the same value as the setting value of WR5 DO D5 Axis assignment See footnote 4 ContinueFlg Set the flag to continue when BP interpolation stopped during driving because the driving speed is too fast to stack the next data VC TRUE Continue FALSE Not continue Can be omitted Default is FALSE VB True Continue False Not continue Return Value If the function succeeds the return value is BP_END If the function fails the return value is the following Error code m Normal end BP_END BP int
108. ion fails the return value is FALSE Example VC long Rr3X Rr3Y Rr3Z Rr3U ReadEventMC8043P No amp Rr3X amp Rr3Y amp Rr3Z amp Rr3U Note The RR3 value of MC8043P is cleared due to the driver operation just after the interrupt occurs The user must use this function in order to know the interrupt factor In addition when the interrupt occurs the driver certainly reads and saves RR3 data regardless of the execution of SetEventMC8043P or ResetEventMC8043P functions RR3 data saved in the driver can be cleared after reading by execution of ReadEventMC8043P function To clear the RR3 data of the driver execute ReadEventMC8043P function 45 NOVA electronics MC8043P M46 Function Name Function and Content Nmc_Reset Reset MC8043P vc void Nmc_Reset int No VB Sub Nmc_Reset ByVal No As Long VB NET Sub Nmc_Reset ByVal No As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Return Value None Example VC Nmc_Reset 0 Reset the board of number 0 VB Call Nmc_Reset 0 Nmc_Command Execute the command of a specified axis Write the command of a specified axis into WRO vc void Nmc_Command int No int Axis int cmd VB Sub Nmc_Command ByVal No As Long ByVal Axis As Long ByVal cmd As Long VB NET Sub Nmc_Command ByVal No As Integer ByVal Axis As Integer ByVal cmd As Integer Input Parameter No Board number setting value of rotary s
109. ircuit When the signal is open it becomes active JP2 Keep 1 2 short circuit default setting JP3 Switch nINO nIN2 signal 1 2 short circuit default The board I O connector nINOP N signal is connected to nINO of MCX314As and the board I O connector nIN2 signal is connected to nIN2 of MCX314As 2 3 short circuit The board I O connector nINOP N signal is connected to nIN2 of MCX314As and the board I O connector nIN2 signal is connected to nINO of MCX314As SW1 Rotary switch to set the board number when multiple boards are used which can be set from 0 to 9 default setting 0 20 NOVA electronics MC8043P M21 8 Installation This chapter describes how to install the board into your PC and install the device driver 8 1 Preparation of Driver Software When installing the driver from CD ROM prepare MC8043P CD ROM When installing the driver from the downloaded file from our homepage extract the file 8 2 How to Install the Board into your PC 1 Make sure that the PC is powered OFF and then remove the external cover and slot cover 2 Insert the board into an empty expansion slot Be sure that the board s edge connector fits into the PC s PCI bus connector 3 Screw the mounting bracket Make sure that you fix the screws appropriately otherwise short out breakdown or operation error may result 4 Replace the external cover Note Make sure the PC s power is shut off before installing the board Otherwi
110. is As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to read data Assign AXIS_X for X axis AXIS_Y for Y axis AXIS_Z for Z axis and AXIS_U for U axis Return Value The value of synchronous action buffer register Example VC Data Nmc_ReadSyncBuff No AXIS_X Read out synchronous action buffer register of X axis VB Data Nmc_ReadSyncBuff No AXIS_X 59 NOVA electronics MC8043P M60 Function Name Function and Content Nmc_GetDriveStatus Read drive status The user can use to check whether the driving of the specified axis has finished or not vc int Nmc_GetDriveStatus int No int Axis VB Function Nmc_GetDriveStatus ByVal No As Long ByVal Axis As Long As Long VB NET Function Nmc_GetDriveStatus ByVal No As Integer ByVal Axis As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to read drive status Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details Return Value If all the specified axes have finished driving the return value is 0 If more than one of the specified axes is are driving the return value is nonzero Example VC _ if Nmc_GetDriveStatus No AXIS_X 0 When X axis has finished driving AfxMessageBox X axis has finished driving else AfxMessageBox X axis is driving VB If Nmc_GetDriv
111. l Axis As Long ByVal wdata As Long VB NET Sub Nmc_Range ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VC Nmc_Range No AXIS_ALL 800000 Set 800000 Multiple 10 to range All axes VB Call Nmc_Range No AXIS_ALL 800000 51 NOVA electronics MC8043P M52 Function Name Function and Content Nmc_Jerk Set jerk vc void Nmc_Jerk int No int Axis long wdata VB Sub Nmc_Jerk ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_Jerk ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VC Nmc_Jerk No AXIS_X 1000 Set 1000 to jerk X axis VB Call Nmc_Jerk No AXIS_X 1000 Nmc_Acc Set acceleration vc void Nmc_Acc int No int Axis long wdata VB Sub Nmc_Acc ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_Acc ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Boar
112. l conditions Operating Temperature 0 45 C 32 113 F Humidity 20 90 no condensation Floating dust Not to be excessive Corrosive gases None Electric supply source DC 5V 45 external source DC 12 24V Perform inspection and maintenance periodically for correct use Cable connection The connector of the board and a cable should properly be connected Card edge No dust and no corrosion Connector terminal area No dust and no corrosion On the IC and board No excessive dust and no foreign substance E Handling Precautions This product is wrapped in an antistatic envelope Before handling the product eliminate static electricity of your body and clothes and then hold both ends of the board between your fingers or hold a mounting bracket Do not touch connector terminals and other terminals of components as much as possible If the person who is electrically charged touches the part CMOS IC can be destroyed by static electricity Use caution to prevent any ESD in a dry condition especially in wintertime Do not use in any location subject to shock vibration magnetism and electricity Otherwise the equipment may be damaged or malfunctioned Do not disassemble repair or modify the equipment Do not connect or disconnect the board or cables while power is applied Otherwise breakdown or operation error may result Information in this manual is subject to change without notice Windows are registered trademark of Microsoft
113. loseCard_all Terminate all the MC8043P Input Parameter None Return Value BOOL If the function succeeds the return value is TRUE If the function fails the return value is FALSE lt Example gt CloseCard_all ReadRR3_N Read the value of RR3 will be cleared after reading right after an interrupt event is generated in MC8043P Input Parameter int Board number setting value of rotary switch 0 9 on the board 1 WORD Pointer to a variable that receives the X axis RR3 value WORD Pointer to a variable that receives the Y axis RR3 value WORD Pointer to a variable that receives the Z axis RR3 value WORD Pointer to a variable that receives the U axis RR3 value Return Value None lt Example gt ReadRR3_N 1 amp Rr3X amp Rr3Y amp Rr3Z amp Rr3U Read RR3 of the board number 0 Note The RR3 value of MC8043P is cleared due to the driver operation just after the interrupt occurs Use this function to check RR3 right after an interrupt generation 91 NOVA electronics MC8043P M92 9 1 4 3 VB6 0 When one MC8043P board is used When programming in VB6 0 and using one MC8043P board the following function can be used Before using the following function set 0 to the value of rotary switch on the board Function Name Function and Content OpenCard Start MC8043P Perform to MC8043P whose board number setting value of rotary switch on the board is 0 Input Parame
114. mc_Center Nmce_Lp Nmc_Ep Nmc_CompP Nmc_CompM Nme_AccOfst Nmce_DJerk Nmc_HomeSpd Nmc_ExpMode Nmc_SyncMode Nmc_WriteData Nmc_WriteData2 Data reading command Nmc_ReadLp Nmc_ReadEp Nmc_ReadSpeed Nmc_ ReadAccDec Nmc_ReadSyncBuff Nmc_ReadData When performing these operations without Nmc_ xxx function the user must take care in multithread environment 1 For example when writing into WR1 Nmc_WriteReg is used however there is other way as follows MOutpMC8043P No MCX314_WRO 0x010F Switch to X axis OutpMC8043P No MCX314 WRI Data Write to WR1 In this case if Nmc_xxx function to switch the axis is executed between D and the data will be written into the WR1 of a different axis 88 NOVA electronics MC8043P M89 2 For example when setting the speed Nmc_Speed is used however there is other way as follows OutpMC8043P No MCX314_WR6 Data Write to WR6 OutpMC8043P No MCX314_WRO 0x0105 Set WR6 data to the speed of X axis Also the following functions can perform the same operation Nmc_WriteReg6 No Data Write to WR6 Nmc_Command No AXIS_X 0x05 Set WR6 data to the speed of X axis In this case if Nmc_xxx function to write data into WR6 WR7 is executed between Q and or and the other data will be set to the speed 3 For example when reading logical position counter Nmc_ReadLp is used however there is other way as follows OutpMC8043P
115. mited Multiple 500 Constant speed symmetrical non symmetrical linear acceleration symmetrical non symmetrical parabola S curve acceleration deceleration drive Auto non symmetrical linear acceleration is also allowed manual Prevention of triangle driving profile for fixed pulse trapezoidal S curve acceleration Output pulse numbers and drive speeds changeable during the driving Independent 2 pulse system or 1 pulse 1 direction system selectable Logical levels of drive pulse selectable E Encoder A B Z Quadrature Input Input Circuit High speed photo coupler input Connectable with differential line driver 2 phase pulse style or Up Down pulse style selectable Pulse of 1 2 and 4 divisions selectable 2 phase pulse style E Position Counter Logic Position Counter for output pulse range 2 147 483 648 2 147 483 647 Real Position Counter for feedback pulse range 2 147 483 648 2 147 483 647 Data read and write possible E Comparison Register COMP Register Position comparison range 2 147 483 648 2 147 483 647 COMP Register Position comparison range 2 147 483 648 2 147 483 647 Status and signal outputs for the comparisons of position counters Software limit functioned 106 NOVA electronics E Automatic home search MC8043P M107 Automatic execution of Step 1 high speed near home search Step 2 low speed home search Step 3 low speed encoder Z phase s
116. n definition file for VB NET 2003 MC8043P Control function sample Solution file for VB sample program VB NET 2003 Executable file Sample program G MC8043P DLL Declaration definition file for VB NET 2003 MC8043P Control function sample Solution file for VB sample program VB NET 2003 Executable file 98 NOVA electronics VC6 NormallyClose Sample A SmapleA cpp MC8043P LIB MC8043P_DLL H VCSample dsw exe VCSampleA exe Sample A SmapleA cpp MC8043P LIB MC8043P_DLL H VCSample dsw exe VCSampleA exe Sample B SmapleB cpp MC8043P LIB MC8043P_DLL H VCSample dsw exe VCSampleB exe Sample C SmapleC cpp MC8043P LIB MC8043P_DLL H VCSample dsw exe VCSampleC exe Sample D SmapleD cpp MC8043P LIB MC8043P_DLL H VCSample dsw exe VCSampleD exe Sample E t MC_SAMPLE cpp MC_SAMPLEDIg cpp t MC_SAMPLE H MC_SAMPLEDIlg H MC8043P cpp MC8043P H MC8043P LIB MC8043P_DLL H MC_SAMPLE dsw t eXe VCSampleE exe MC8043P M99 Sample program A Normally Close MC8043P DLL Library file MC8043P DLL Header file function declaration definition Project workspace for VC sample program VC6 0 only Sample A executable file Sample program A MC8043P DLL Library file MC8043P DLL Header
117. n has started End If End Sub In VB the following message received function is applied WM_BP_END message received function Function WindowProc ByVal hw As Long ByVal uMsg As Long ByVal wParam As Long ByVal IParam As Long As Long If UMsg WM_BP_END Then __ BP interpolation finishing message If Param BP_END Then Return value is correct Interpolation has finished Call MsgBox Interpolation has been successfully completed End If End If WindowProc CallWindowProc glpPrevWndProc hw uMsg wParam IParam End Function In VB NET the following message received function is applied WM_BP_END message received function Protected Overrides Sub WndProc ByRef m As Message If m Msg WM_BP_END Then BP interpolation finishing message If Param BP_END Then Return value is correct Interpolation has finished Call MsgBox Interpolation has been successfully completed End If End If MyBase WndProc m End Sub 68 NOVA electronics MC8043P M69 Function Name Nmc_2CIPExec Function and Content Execute 2 axis continuous interpolation using the specified interpolation data This function returns control after the interpolation process has finished That is the control will not return unless the interpolation process ends so it is recommended to create a thread in the application and call from the thread vc DWORD Nmc_2CIPExec int No DATA_2CIP pData2Cip int DataCnt int IpAxis BOOL SpdChgFlg F
118. ne MCX314 RRS 0x0005 define MCX314 RR6 0x0006 define MCX314 RR7 0x0007 Axis assignment define AXIS_ALL OxF define AXIS_X 0x1 define AXIS_Y 0x2 define AXIS_Z 0x4 define AXIS_U 0x8 define AXIS_NONE 0 Command definition Driving commands define CMD_F_DRV P 0x20 define CMD_F_DRV_M 0x21 define CMD_C_DRV_P 0x22 define CMD_C_DRV_M 0x23 define CMD_START_HOLD 0x24 define CMD_START_FREE 0x25 define CMD_STP_STS_CLR 0x25 define CMD_STOP_DEC 0x26 define CMD_STOP_SUDDEN 0x27 Interpolation commands define CMD_IP_2ST 0x30 define CMD_IP_3ST 0x31 define CMD_IP_CW 0x32 define CMD_IP_CCW 0x33 define CMD_IP_2BP 0x34 define CMD_IP_3BP 0x35 define CMD_BP_ENABLED 0x36 define CMD_BP_DISABLED 0x37 define CMD_BP_STACK 0x38 define CMD_BP_CLR 0x39 define CMD_IP_1STEP 0x3A MC8043P M78 WRO address WRI address WR2 address WR3 address WR4 address WR5 address WR6 address WR7 address RRO address RR1 address RR2 address RR3 address RR4 address RR5 address RR6 address RR7 address All axes X axis Y axis Z axis U axis No axis assignment direction fixed pulse driving direction fixed pulse driving direction continuous pulse driving direction continuous pulse driving Drive status holding Drive status holding release Finishing status clear Drive status holding release Finishing status clear
119. ng speed is too fast to stack the next data VC TRUE Continue FALSE Not continue Can be omitted Default is FALSE VB True Continue False Not continue Return Value If the function succeeds the return value is CIP_END If the function fails the return value is the following Error code m Normal end CIP_END Continuous interpolation has been successfully completed m Error code CIP_CNT_ERR The number of the specified data is out of range CIP_ALREADY_EXEC BP interpolation or continuous interpolation is already running CIP_CMD_ERR The wrong command was specified CIP_STOP Continuous interpolation stopped during driving too fast to set next data CIP_USER_STOP The user aborted continuous interpolation CIP_DRIVE_ERR Error occurred in MC8043P during continuous interpolation When the error status was set to RRO 71 NOVA electronics MC8043P M72 Function Name Function and Content Example VC VB DATA_3CIP Data3Cip 2 Il 3 axis continuous interpolation data 3 axis continuous interpolation data setting Data3Cip 0 EndP1 1000 Data3Cip 0 EndP2 2000 Data3Cip 0 EndP3 3000 Data3Cip 0 Speed 0 Data3Cip 1 EndP1 2000 Data3Cip 1 EndP2 1000 Data3Cip 1 EndP3 3000 Data3Cip 1 Speed 0 Nmc_WriteReg5 No 0x24 Axis assignment for interpolation Master axis X Second axis Y Third axis Z Ret Nmc_3CIPExec No Data3Cip 2 0x24 Execute 3 axis
120. nt for interpolation Master axis X Second axis Y Third axis Z 3 axis continuous interpolation The number of data is 2 X Y Z axes Ret Nmc_3CIPExec_BG hWnd No Data3Cip 0 2 amp H24 False False If Ret CIP_START Then Return value is correct Interpolation has started Call MsgBox Interpolation has started End If End Sub In VB the following message received function is applied WM_CIP_END message received function Function WindowProc ByVal hw As Long ByVal uMsg As Long ByVal wParam As Long ByVal IParam As Long As Long If uMsg WM_CIP_END Then Continuous interpolation finishing message If Param CIP_END Then Return value is correct Interpolation has finished Call MsgBox Interpolation has been successfully completed End If End If WindowProc CallWindowProc glpPrevWndProc hw uMsg wParam IParam End Function In VB NET the following message received function is applied WM_CIP_END message received function Protected Overrides Sub WndProc ByRef m As Message If m Msg WM_CIP_END Then Continuous interpolation finishing message If Param CIP_END Then Return value is correct Interpolation has finished Call MsgBox Interpolation has been successfully completed End If End If MyBase WndProc m End Sub 76 NOVA electronics MC8043P M77 Function Name Function and Content Nmc_IPStop Stop the interpolation process during driving The interpolation driving
121. o WR2 Mode register 2 vc void Nmc_WriteReg2 int No int Axis long wdata VB Sub Nmc_WriteReg2 ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_WriteReg2 ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to write data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be written Return Value None Example VC Nmc_WriteReg2 No AXIS_Y 0x2000 Enable ALARM Y axis VB Call Nmc_WriteReg2 No AXIS_Y amp H2000 47 NOVA electronics MC8043P M48 Function Name Function and Content Nmc_WriteReg3 Write data into WR3 Mode register 3 vc void Nmc_WriteReg3 int No int Axis long wdata VB Sub Nmc_WriteReg3 ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_WriteReg3 ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to write data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be written Return Value None Example VC Nmc_WriteReg3 No AXIS_ALL 0x0100 Hi level output for all axes general output OUT4 VB Call Nmc_WriteReg3 No AXIS_ALL amp H0100 Nmc_WriteReg4 Write d
122. of MC8043P in VB applications mM When modifying the existing MC8041P application to MC8043P application Note The MC8043P s driver supports Windows 2000 or Windows XP And it does not support Windows 95 98 or Windows NT 1 Add MC8043P_DLL BAS in Lib VB6 folder to your project to development as a Module 2 Delete the Declare statement for MC8041P DLL function declared in the existing MC8041P application source Examples of the Declare statement for MC8041P DLL to be deleted Declare Function OpenCard Lib mc8041p dll ByVal isr As Long As Long Declare Function CloseCard Lib mc8041p dll As Long 3 The user can use functions of 9 1 4 3 9 1 4 4 VB6 0 in 9 1 4 API Supporting Function used by MC8041P Driver For the board number refer to the chapter of above API However VB does not support the interrupt so if the interrupt handling is already included the user must change it 4 Create exe file When the file is successfully compiled the user can run the application on the machine properly installed MC8043P driver If the user cannot link to MC8043P dll during debugging copy MC8043P dll to the current folder Note The user cannot use interrupt of MC8043P in VB applications 9 3 3 When developing applications with VB NET 2003 E When newly developing MC8043P applications 1 Add MC8043P_DLL vb in Lib VB NET2003 folder to your project to development 2 Program by using functions of 9 1 3 API MC8043P Driver
123. of wiring Be sure to check motor rotation and the operation of a limit switch separating the motor from the device Inputting an electrical surge may cause the malfunction of MC8043P T O Signal Connection When connecting an external power or I O signal do not reverse the polarity and do not apply a voltage current over a rated range Otherwise the destruction of circuit elements or reliability degradation may occur Make sure to correctly wire them T O Cable The included I O cable is 1 2 meters in length however A33 A50 and B33 B50 signals are the same input output signal line as the PC internal circuit so that the user must use the minimum length and be careful not to be affected by electromagnetic induction noise from the environment 2374 NOVA electronics MC8043P M38 9 Programming This chapter describes software specifications and how to program applications Applications can be developed with Microsoft Visual C VC or Microsoft Visual Basic VB 9 1 Software Specifications 9 1 1 Operating Environment Operating Systems Windows 2000 Windows XP Support Languages Microsoft Visual C 6 0 Microsoft Visual Basic 6 0 Microsoft Visual C NET 2003 Microsoft Visual Basic NET 2003 9 1 2 Program Configuration File Configuration File Type Folder File Name Folder Description Device Driver Driver MC8043P SYS Device driver MC8043P DLL Dynamic link library for V
124. olation using interpolation function 38 NOVA electronics MC8043P M39 Configuration File Type Folder File Name Folder Description VB Sample Program Sample NormallyClose Sample program A NormallyClose VB NET2003 VB NET2003 Sample A Limit input display Logical position counter display fixed driving operation example The sample for the logic of the limit sensor is normally closed VC Sample Program Sample VC6 Sample A Sample program A VC6 0 Limit input display Logical position counter display fixed driving operation example Sample B Sample program B Program example using interrupt Sample C Sample program C For multiple boards Limit input display Logical position counter display fixed driving operation example Sample D Sample program D For multiple boards Program example using interrupt Sample E Sample program E Fixed drive for all axes RRO 1 2 4 5 reading example interrupt program example Sample F Sample program F Continuous interpolation program example using interrupt Sample G Sample program G BP interpolation and Continuous interpolation using interpolation function NormallyClose Sample A Sample program A NormallyClose Limit input display Logical position counter display fixed driving operation example The sample for the logic of the limit sensor is normally closed Note Description about files being automatically crea
125. om Build Step Web Deployment Additional Dependencies Specifies additional items to add to the link line ex kernel32 lib configuration specific Cancel Apply Help Fig 9 3 2 VC NET 2003 Project Properties 101 NOVA electronics MC8043P M102 mM When modifying the existing MC8041P application to MC8043P application Note The MC8043P s driver supports Windows 2000 or Windows XP And it does not support Windows 95 Windows 98 or Windows NT The user can modify the existing MC8041P application to MC8043P application by replacing MC8041P lib and MC8041P h provided files for MC8041P by MC8043P lib and MC8043P_DLL h and rebuilding them Steps to modify are as follows 1 Copy two files MC8043P lib and MC8043P_DLL h in Lib VC6 folder to the application s folder to development 2 Add MC8043P_DLL h to your project in VC and delete the existing MC8041P h from your project Then change include MC8041P h to include MC8043P_DLL h in the source file However if you have added extra modification to MC8041P h the extra modification must be remained 3 For VC 6 0 users go to Project Settings Link and then delete MC8041P lib from Object library modules then designate MC8043P lib See Fig 9 3 1 VC 6 0 Project Settings For VC NET 2003 users go to Project Properties Linker Input and then delete MC8041P lib from Additional Dependencies then de
126. omputer on the hardware installation CD or on the Windows Update Web site with your permission Read our privacy policy Can Windows connect to Windows Update to search for software O Yes this time only O Yes now and every time connect a device ol Click Next to continue 6 Found New Hardware Wizard will open Select Install from a list or specific location Advanced then click Next Found New Hardware Wizard This wizard helps you install software for Other PCI Bridge Device gt i your hardware came with an installation CD lt Q or floppy disk insert it now What do you want the wizard to do O Install the software automatically Recommended Install from a list or specific location Advanced Click Next to continue 26 NOVA electronics MC8043P M27 7 Select Search for the best driver in these locations and check Include this location in the search When installing the driver from CD ROM insert CD ROM into CD drive CD ROM will soon to be recognized by OS Click Browse button and select the Driver folder in CD ROM When CD ROM is in D drive select D Driver or select the downloaded driver folder on hard disc and then click Next Found New Hardware Wizard Please choose your search and installation options Search for the best driver in these locations Use the check boxes below to limit or expand the default search which includes local paths and removable media Th
127. on current 700mA max External Supply Voltage 12 24V Board Dimensions O Connector Type Accessories 174 6 x 106 7mm Connectors and brackets excluded FX2B 100PA 1 27DS Hirose FX2B 100SA 1 27R Hirose with 1 2m cable 107
128. on is already running BP_THREAD_ERR Thread cannot be started BP_MALLOC_ERR Memory cannot be allocated After the interpolation process has been successfully started in the background WM_BP_END message is sent to the specified window at the end of the interpolation The board number is passed to the first argument received in WM_BP_END message received function and finishing status is passed to the second argument If the interpolation has been successfully completed the finishing status is BP_END If an error occurred during the interpolation process the following Error code errors after starting the interpolation returns m Normal end BP_END BP interpolation has been successfully completed m Error code errors after starting the interpolation BP_STOP BP interpolation stopped during driving too fast to stack next data BP_USER_STOP The user aborted BP interpolation BP_DRIVE_ERR Error occurred in MC8043P during BP interpolation When the error status was set to RRO 65 NOVA electronics MC8043P M66 Function Name Function and Content Example VC VB BP interpolation data BP1P BP1M BP2P BP2M DATA_2BP Data2Bp 2 0x0000 Ox2BFF OxFFD4 0x0000 OxF6FE 0x0000 0x000F Ox3FCO Nmc_WriteReg5 No 0x04 Axis assignment for interpolation Master axis X Second axis Y Ret Nmc_2BPExec_BG hWnd No Data2Bp 2 0x04 Execute 2 axis BP interpolation The number of dat
129. onous action mode WR7_data Data to be written into EM7 in extension mode and into SM7 in synchronous action mode Return Value None Example Write EM6 data 5F00 H and EM7 data 45 H into extension mode of X axis VC Nmc_WriteData2 No AXIS_X 0x60 0x5F00 0x0045 VB Call Nmc_WriteData2 No AXIS_X amp H60 amp H5F00 amp H45 Nmc_ReadData Read out data by executing commands for reading data vc long Nmc_ReadData int No int Axis int cmd VB Function Nmc_ReadData ByVal No As Long ByVal Axis As Long ByVal cmd As Long As Long VB NET Function Nmc_ReadData ByVal No As Integer ByVal Axis As Integer ByVal cmd As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to read data Assign AXIS_X for X axis AXIS_Y for Y axis AXIS_Z for Z axis and AXIS_U for U axis cmd Commands for reading data 10 H 14 H Ex Logical position counter reading is 10 H Return Value Data to be read Example VC Data Nmc_ReadData No AXIS_X 0x10 Read the logical position counter of X axis VB Data Nmc_ReadData No AXIS_X amp H10 62 NOVA electronics MC8043P M63 Function Name Function and Content Nmc_2BPExec Execute 2 axis bit pattern interpolation using the specified interpolation data This function returns control after the interpolation process has finished That is the control will not return unless the
130. oo fast to set next data The user aborted Continuous interpolation Error occurred in MC8043P during Continuous interpolation When the error status was set to RRO 79 NOVA electronics MC8043P M80 2 The method of axis assignment is as follows X axis AXIS X Y axis AXIS _Y Z axis AXIS Z U axis AXIS U Allaxes AXIS ALL To assign axis Specify one of the following axes AXIS_X AXIS_Y AXIS_Z AXIS_U Example Set 1000 to the drive speed of X axis VC Nmc_Speed No AXIS_X 1000 VB Call Nmc_Speed No AXIS_X 1000 To assign 2 axes Use Bit OR operator For instance if the user tries to assign X and Y axes simultaneously VC gt Specify AXIS_X AXIS_Y VB gt Specify AXIS _X Or AXIS_Y Example Set 1000 to the drive speed of X and Y axes VC Nmc_Speed No AXIS X AXIS_Y 1000 VB Call Nmc_Speed No AXIS_X Or AXIS_Y 1000 To assign 3 axes Use Bit OR operator For instance if the user tries to assign X Y and Z axes simultaneously VC gt Specify AXIS _X AXIS_Y AXIS_Z VB Specify AXIS _X Or AXIS_Y Or AXIS _Z Example Set 1000 to the drive speed of X Y and Z axes VC Nmc_Speed No AXIS X AXIS_Y AXIS_Z 1000 VB Call Nmc_Speed No AXIS_X Or AXIS_Y Or AXIS_Z 1000 To assign all axes Specify AXIS_ALL Example Set 1000 to the drive speed of all axes VC Nmc_Speed No AXIS ALL 1000 VB Call Nmc_Speed No AXIS_ALL 1000 80 NOVA electronics
131. osition Counter Setting O O O Nmc_Ep Real Position Counter Setting O O O Nmc_CompP COMP Register Setting O O O 56 Nmc_CompM COMP Register Setting O O O Nmc_AccOfst Acceleration Counter Offsetting O O O Nmc_DJerk Deceleration Increasing Rate Setting O O O 57 Nmc_HomeSpd Home Search Speed Setting O O O 40 NOVA electronics 6 Extension Synchronous Action Mode Settings 7 lt 8 lt 9 10 MC8043P M41 Function Name Description VC VB VB NET Page Nmc_ExpMode Extension Mode Setting O O O 57 Nmc_SyncMode Synchronous Action Mode Setting O O O 58 Data Reading Function Name Description VC VB VB NET Page Nmc_ReadLp Logical Position Counter Reading O O O 58 Nmc_ReadEp Real Position Counter Reading O O O Nmc_ReadSpeed Current Drive Speed Reading O O O 59 Nmc_ReadAccDec Current Acceleration Deceleration Reading O O O Nmc_ReadSyncBuff Synchronous Action Buffer Register Reading O O O Status Reading Function Name Description VC VB VB NET Page Nmc_GetDriveStatus Drive Status Reading O O O 60 Nmc_GetCNextStatus The Status Reading of Ready Signal for Writing of O O O Continuous Interpolation Nmc_GetBpSc BP Interpolation Stack Counter Reading O O O 61 Writing Reading Function Name Description VC VB VB
132. ote 2 for more details wdata Data to be set Return Value None Example VC Nmc_StartSpd No AXIS_U 100 Set 100 to initial speed U axis VB Call Nmc_StartSpd No AXIS_U 100 Nmc_Speed Set drive speed vc void Nmc_Speed int No int Axis long wdata VB Sub Nmc_Speed ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_Speed ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to set data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be set Return Value None Example VC Nmc_Speed No AXIS_X AXIS_Y 1000 Set 1000 to drive speed X Y axes VB Call Nmc_Speed No AXIS_X Or AXIS_Y 1000 Nmc_Pulse Set output pulse number or interpolation finish point VC only The number of output pulses indicates the total number of pulses that are output in fixed pulse driving For linear and circular interpolation driving set the finish point of each axis The finish point should be set by relative numbers The output pulse number is unsigned 32 bit value The interpolation finish point is signed 32 bit value vc void Nmc_Pulse int No int Axis long wdata VB cannot be used VB NET cannot be used Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to s
133. pecified drive pulse In continuous pulse driving mode drive pulse is output continuously while the input signal is low This function can reduce the load of the host CPU so the user can perform jog feed of each axis speedy These input signals are isolated by photo coupler from internal circuit E Emergency Stop Input EMG This signal is to perform the emergency stop for all axes Active logical level can be set by selecting a jumper on the board This input signal is isolated by photo coupler from internal circuit NOVA electronics MC8043P M4 2 O Address Setting and Register T O port address of the board is automatically determined by the plug and play function PnP function of the PCI bus The board requires serial 16 I O address locations for PCI bus Check it not to overlap the I O address of PC main board or other I O expansion boards using System Properties Device Manager T O port address of MCX314As is as shown in the table below The number in of I O address means each register address when PnP function sets to 0280 028Fh Each register is 16 bit length Be sure to access by word it cannot be accessed by byte For details on each register see chapter 4 of MCX314As user s manual I O Address Write Register Read Register SA3 SA2 SA1 0284h 028Eh Register Name Command register X axis mode register 1 Y axis mode register 1 Z axis mode register 1 U axis mode register 1 X axis mode
134. plications 103 NOVA electronics MC8043P M104 9 4 Notes on Programming 1 Initial setting of input signal filter Each input signal of MC8043P for example a limit signal uses the built in integral filter of MCX314As The device driver provided by NOVA electronics sets the filter as shown below for each input signal by writing extension mode setting command 60h to MCX314As by default when PC is powered on Filter delay time 512 u sec Each Input Signal Filter Enable Disable Signal Name Enable Disable EMG nLMT nLMT nINO nIN1 Enable nIN2 Enable nINPOS nALARM Enable nEXOP nEXOP Enable nIN3 Enable To switch Enable Disable of these input signal filters on the application see chapter 6 16 of MCX314As user s manual It can be changed by extension mode setting command 60h The following example shows that all axes X Y Z and U axes of the board number 0 are set to the same setting as the table above Nmc_ExpMode executes extension mode setting command 60h Example 1 Nmec_ExpMode 0 AXIS_ALL 0x5F00 0x0000 Example 2 OutpMC8043P 0 MCX314_WR6 0x5F00 OutpMC8043P 0 MCX314_WR7 0x0000 OutpMC8043P 0 MCX314_WRO Ox0F60 Notes Extension mode setting command 60h also sets the automatic home search WR7 setting with input signal filter WR6 setting If the user tries to set either be sure to set the proper value to both WR6 and WR7 wWhen the user executes soft reset se
135. polation interrupt are enabled do as follows When checking the factor of the interrupt in the interrupt user function read the factor of RR3 interrupt first and after that check whether the interpolation interrupt occurs or not Example The Interrupt User Function Process when the interrupt occurs 1 Read the factor of RR3 interrupt by using ReadEventMC8043P And check if there is the interrupt on RR3 or not 2 Check if there is the interpolation interrupt or not Check the bit CNEXT of RRO or the bit BPSC1 0 of RRO l The interrupt that occurs when the bit CNEXT D9 of RRO becomes 1 when the next segment data and the interpolation command become writable during the continuous interpolation driving Or the interrupt that occurs when the value of the stack counter has changed into 1 from 2 during the BP interpolation 2 The user function specified by SetEventMC8043P function If you use the MC8041P function it is the user function specified by OpenCard or OpenCard_N function 3 If you use the MC8041P function it is ReadRR3 or ReadRR3_N function Windows 2000 Windows XP Microsoft Visual C and Microsoft Visual Basic are registered trademarks of Microsoft Corporation 105 NOVA electronics MC8043P M106 10 _ Specifications Control Axis PCI Bus Interface Data Bit Width Occupied I O Address Interrupt Interpolation Functions E 2 axis 3 axis Linear Interpolation Interpolation Ran
136. polation stopped during driving because the driving speed is too fast to stack the next data VC TRUE Continue FALSE Not continue Can be omitted Default is FALSE VB True Continue False Not continue Return Value If the function succeeds the return value is BP_END If the function fails the return value is the following Error code m Normal end BP_END BP interpolation has been successfully completed m Error code BP_CNT_ERR The number of the specified data is out of range BP_ALREADY_EXEC BBP interpolation or continuous interpolation is already running BP_STOP BP interpolation stopped during driving too fast to stack next data BP_USER_STOP The user aborted BP interpolation BP_DRIVE_ERR Error occurred in MC8043P during BP interpolation When the error status was set to RRO Example VC BP interpolation data BP1P BP1M BP2P BP2M BP3P BP3M DATA_3BP Data3Bp 2 OxFF30 0 0 Ox84FF 0 OxAC35 OxAC35 0 OxC000 0x36E7 0xC000 0x3F3F Nmc_WriteReg5 No 0x24 Axis assignment for interpolation Master axis X Second axis Y Third axis Z Ret Nmc_3BPExec No Data3Bp 2 0x24 Execute 3 axis BP interpolation The number of data is 2 X Y Z axes if Ret BP_END AfxMessageBox Successful completion Return value is correct VB Dim Data3Bp 1 As DATA_3BP 3 axis BP interpolation data 3 axis BP interpolation data setting Data3Bp 0 Bp1p amp HFF30 Data3Bp 0 Bp1m amp HO Data
137. r ByVal cmd As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to write data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details cmd Commands for data writing 00 H 0E H 61 H Ex Range setting is 00 H wdata Data to be written Return Value None Example Set 1000 to the drive speed of all axes Drive speed command code is 05 H VC Nmc_WriteData No AXIS_ALL 0x05 1000 VB Call Nmc_WriteData No AXIS_ALL amp H05 1000 Nmc_WriteData2 Write the data of extension mode or synchronous action mode into the specified axis Execute commands for data writing vc void Nmc_WriteData2 int No int Axis int cmd long WR6_data long WR7_data VB Sub Nmc_WriteData2 ByVal No As Long ByVal Axis As Long ByVal cmd As Long ByVal WR6_data As Long ByVal WR7_data As Long VB NET Sub Nmc_WriteData2 ByVal No As Integer ByVal Axis As Integer ByVal cmd As Integer ByVal WR6_data As Integer ByVal WR7_data As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to write data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details cmd Commands for data writing Specify 60 H for extension mode and 64 H for synchronous action mode WR 6_data Data to be written into EM6 in extension mode and into SM6 in synchr
138. re different from MC8041P for upgrade E Input Signal Filter Circuit Deletion In MCX314As all the input signals excluding nECA B signal are equipped with the integral filters in the IC MC8043P board is not equipped with CR filter on the board in order to effectively use these built in integral filters IC built in filter sets the delay time of all the input signals excluding nECA B signal to 512 4 sec at the initial setting of Windows device driver provided by NOVA electronics IC built in filter can freely change the delay time in mode setting of MCX314As MCX314As 5V __ nLMT Built in filter Delay time 512 u SEC default E Encoder Z phase Input Signal Switching MC8041P uses nINO as the input of an encoder Z phase signal However if the user uses automatic home search function of MCX314As on MC8043P nIN2 is assigned to the input of the encoder Z phase signal In MC8043P short circuiting 1 and 2 of the jumper pin JP3 nINO can be used as the encoder Z phase signal as well as MC8041P factory default And if short circuiting 2 and 3 of the jumper pin JP3 encoder Z phase input is connected to nIN2 of MCX314As and the encoder Z phase signal can be input in automatic home search of MCX314As MCX314As MCX314As eneral purpose ener al purpose nIN2 phi speed er nIN2 nIN2 pies Reed er ni N2 High speed n I NOP Y High speed n I NOP z fiINoN Encoder 2 phase nINO Photo cdo lef nINON Encoder Z phase JP3
139. register 2 Y axis mode register 2 Z axis mode register 2 U axis mode register 2 BP1P register X axis mode register 3 Y axis mode register 3 Z axis mode register 3 U axis mode register 3 BP1M register Output register BP2P register Interpolation mode register BP2M register Write data register 1 BP3P register Write data register 2 BP3M register Register Name Main status register X axis status register 1 Y axis status register 1 Z axis status register 1 U axis status register 1 X axis status register 2 Y axis status register 2 Z axis status register 2 U axis status register 2 X axis status register 3 Y axis status register 3 Z axis status register 3 U axis status register 3 Input register 1 Input register 2 Read data register 1 Read data register 2 NOVA electronics MC8043P M5 3 I O Signals This chapter describes each I O signal of the I O connector In the description the signal name of each axis is described as nOOOCO This n means X Y Z and U 3 1 1 O Connector I O Connector Pin Assignments When implemented in PC the connector may be upside down occasionally Pin 1 Mark 7 AAA AAA AEE EA EAA EEE EAA AAEEEY g Wy ASO WH B50 B49 B2 B1 Cable indluded 1 2m The cable included is A1 A2 A49 A50 from the right red of the upper cable to the left and B1 B2 B49 B50 from the right red o
140. s This signal delay time can be changed for circumstances of system noise For more details see chapter 2 8 and 6 16 of MCX314As user s manual 3 10 External Power VEX The power supplied externally is used for over run limit input signal nLMT nLMT of each axis decelerating stop instant stop nIN1 nIN2 nIN3 input signal for servo motor nINPOS nALARM external signal for driving nEXOP nEXOP and emergency stop input signal EMG DC12 24V is needed Consumption current is 3 3mA per 1 input signal in DC12V and 7mA per 1 input signal in DC24V 13 NOVA electronics MC8043P M14 4 Interrupt This board has an interrupt signal generated by MCX314As which connect to the INTA of four interrupt request signals in the PCI bus The interrupt can be handled in the application on Windows Create an application program with VC VB program cannot handle the interrupt For more details on programming handling the interrupt see chapter 9 Programming 14 NOVA electronics MC8043P M15 5 Connection Example for Motor Driver 5 1 Connection Example for Stepper Motor The figure shown below illustrates the connection example of MC8043P X axis and 5 phase micro step driver KR535M MC 804 3P 5 phase micro step driver 1 0 Connector DC5V Power KR 535M A38 A389 as Source XP P XP N XP P XP N CW pulse Lf PW tse Hold OFF XOUT4 GND A3 Notel Wire hold OFF signal ac
141. s correct Call MsgBox Successful completion End If 63 NOVA electronics MC8043P M64 Function Name Function and Content Nmc_3BPExec Execute 3 axis bit pattern interpolation using the specified interpolation data This function returns control after the interpolation process has finished That is the control will not return unless the interpolation process ends so it is recommended to create a thread in the application and call from the thread vc DWORD Nmc_3BPExec int No DATA_3BP pData3Bp int DataCnt int IpAxis BOOL ContinueFlg FALSE VB Function Nmc_3BPExec ByVal No As Long ByRef pData3Bp As DATA_3BP ByVal DataCnt As Long ByVal IpAxis As Long ByVal ContinueFlg As Long As Long VB NET Function Nmc_3BPExec ByVal No As Integer ByRef pData3Bp As DATA_3BP ByVal DataCnt As Integer ByVal IpAxis As Integer ByVal ContinueFlg As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board pData3Bp Pointer to an array of DATA_3BP structures user defined type in VB Set the 3 axis BP interpolation data to DATA_3BP See footnote 3 for DATA_3BP DataCnt The number of 3 axis BP interpolation data Specify the number of the DATA_3BP structure user defined type array IpAxis Axis to execute interpolation Specify the same value as the setting value of WR5 DO D5 Axis assignment See footnote 4 ContinueFlg Set the flag to continue when BP inter
142. se the circuit elements may be damaged Notes on using multiple boards When using multiple boards on a system PC in order to individually recognize each board on the PCI bus set the board number of second or later board by the rotary switch on the board For the location of the rotary switch SW71 see chapter 7 Board Dimensions 21 NOVA electronics MC8043P M22 8 3 How to Install Device Driver The device driver is common in the operation systems and languages described in chapter 9 1 1 The device driver can recognize the board up to 10 simultaneously Hereinafter the installation procedure will be described for each OS 8 3 1 Windows 2000 Before starting the installation procedure ensure that you are logged on to Windows with a user name having administrator authority Otherwise the installation is not successfully completed 1 Prepare the device driver by chapter 8 1 2 Make sure that the board is seated properly in the PC by chapter 8 2 3 Turn on the PC and start Windows 2000 4 Log on to Windows with a user name having administrator authority 5 Windows will display the notification Found New Hardware and Found New Hardware Wizard will open 6 Click Next on Found New Hardware Wizard Welcome to the Found New Hardware Wizard This wizard helps you install a device driver for a hardware device To continue click Next 7 Select Search for a suitable driver for my device recommende
143. se the board 0 OutW Write 1 word 16 bit into output port Perform to MC8043P whose board number setting value of rotary switch on the board is 0 Input Parameter ByVal As Short Write register number WRO WR7 ByVal As Integer Data to be written Return Value None lt Example gt Call OutW WRO amp H8000 Soft reset the board Note The write register numbers WRO WR7 are defined in the MC8043P_DLL vb file InW Read out 1 word 16 bit from input port Perform to MC8043P whose board number setting value of rotary switch on the board is 0 Input Parameter ByVal As Short Read register number RRO RR7 Return Value As Integer 1 word read out from input port lt Example gt data InW RRO Read out the read register RRO Note The read register numbers RRO RR7 are defined in the MC8043P_DLL vb file 94 NOVA electronics MC8043P M95 9 1 4 6 VB NET 2003 When multiple MC8043P boards are used When programming in VB NET 2003 and using multiple MC8043P boards the following function can be used Function Name Function and Content OpenCard_N Start MC8043P Input Parameter ByVal As Integer Board number setting value of rotary switch 0 9 on the board 1 0 Fixed Return Value As Integer If the function succeeds the driver handle returns If the function fails the return value is NULL lt Example gt status OpenCard_N 1 0 When opening the board 0 set 1 to the first argument The
144. setting value of rotary switch on the board is 0 Input Parameter void WINAPI Interrupt handling function address When the interrupt is not used it is NULL Return Value HANDLE If the function succeeds the driver handle returns If the function fails the return value is NULL lt Example gt status OpenCard isr When using the interrupt and isr is specified to the interrupt function status OpenCard NULL When not using the interrupt CloseCard Terminate MC8043P Perform to MC8043P whose board number setting value of rotary switch on the board is 0 Input Parameter None Return Value BOOL If the function succeeds the return value is TRUE If the function fails the return value is FALSE lt Example gt CloseCard OutW Write 1 word 16 bit into output port Perform to MC8043P whose board number setting value of rotary switch on the board is 0 Input Parameter WORD Write register number WRO WR7 int Data to be written Return Value None lt Example gt OutW WRO 0x8000 Soft reset the board Note The write register numbers WRO WR7 are defined in the MC8043P_DLL h file Inw Read out 1 word 16 bit from input port Perform to MC8043P whose board number setting value of rotary switch on the board is 0 Input Parameter WORD Read register number RRO RR7 Return Value WORD 1 word read out from input port lt Example gt data InW RRO Read out the read register RRO Note
145. signate MC8043P lib See Fig 9 3 2 VC NET 2003 Project Properties 4 MC8041P lib and MC8041P h for MC8041P are not used so move them to the other folder according to need 5 The user can use functions of 9 1 4 1 9 1 4 2 VC in 9 1 4 API Supporting Function used by MC8041P Driver For the board number refer to the chapter of above API However the user may need to change the interrupt handling of the source file In this driver the user can read out RR3 register by using ReadRR3 function or ReadRR3_N function after an interrupt occurs And the user cannot directly read out RR3 register by InW or InW_N function See Note in ReadRR3 function for a reason Therefore if the user is using InW or InW_N function to read out RR3 register after an interrupt occurs the user must change these functions to ReadRR3 or ReadRR3_N function 6 Rebuild the application When the application is successfully rebuilt the user can run the application on the machine properly installed MC8043P driver 102 NOVA electronics MC8043P M103 9 3 2 When developing applications with VB6 0 mM When newly developing MC8043P applications 1 Add MC8043P_DLL BAS in Lib VB6 folder to your project to development as a Module 2 Program by using functions of 9 1 3 API MC8043P Driver Function If the user cannot link to MC8043P dll during debugging copy MC8043P dll to the current folder Note The user cannot use interrupt
146. system noise For more details see chapter 2 8 and 6 16 of MCX314As user s manual MCX314As my VEX 12 24V 10K nEXPP at yi LP28lor equivalent yee 5V B ltin fite NEXPM ve nEXOP Delay time 512 u SEC default 7 External Driving Signal Circuit 3 9 Emergency Stop Input Signal EMG All the drive pulse output stops when emergency stop signal becomes active Active level can be switched by the JP1 jumper pin on the board When emergency stop signal becomes active during driving driving for all axes stops instantly and 1 is set to the error bit of all axes of main status register For emergency stop of MCX314As see chapter 2 9 6 and 4 12 of MCX314As user s manual JP1 1 2 short circuit When emergency stop signal EMG is short circuited with GND of the external power it becomes active JP1 2 3 short circuit When emergency stop signal EMG is open it becomes active Factory default is 1 2 short circuited MCX314As 5V O VEX 12 24V o EMG TLP121 ivalent JP1 EMG level switching pCR eras 1 2 short circuited in factory default Delay time 512uSEC defay t Emergency Stop Input Signal Circuit To enable this signal external power supply DC12 24V is needed When the board is powered on the built in integral filter of MCX314As shown above becomes the setting of signal delay time 512 u sec due to the default setting of Windows device driver provided by NOVA electronic
147. t 1 to WRO D15 in the application the device driver sets the above setting the same setting as the above table to the filter of each input signal 2 PC standby mode and hibernation mode In this driver the operation after standby or hibernation mode is not guaranteed When the user tries to access MC8043P after standby or hibernation mode be sure to restart PC before access 3 Interrupt support The user can use the interrupt in the application only developed in VC And the user can not use the interrupt in the application developed in VB Supported interrupts are as follows All interrupts reported by RR3 register The interrupt that occurs when the bit CNEXT of RRO becomes 1 during continuous interpolation execution If this bit is 1 the user can set next segment data and interpolation drive command The interrupt that occurs when the value of stack counter changes from 2 to 1 in bit pattern interpolation 104 NOVA electronics Mc8043P M105 4 Interrupt clearing The interrupt reported by RR3 register The interrupt is cleared after the driver read RR3 just after the interrupt occurs in MC8043P Then user defined function of the application for interrupt is called Only when user defined function has been set The interrupt that occurs when the bit CNEXT of RRO becomes 1 in continuous interpolation driving The interpolation interrupt is cleared in the driver just after the interrupt occurs in MC8043P
148. ted by VC MFC AppWizard is omitted 39 NOVA electronics 9 1 3 API MC8043P Driver Function API provided by MC8043P SYS and MC8043P DLL 9 1 3 1 Function List The following table is the API function list The column of VC VB VB NET indicates the availability of each function in each language 1 Basic Function MC8043P M40 is available and X is not Function Name Description VC VB VB NET Page OpenMC8043P Start to use MC8043P O O O 42 CloseMC8043P Stop to use MC8043P O O O CloseAlIIMC8043P Stop to use all the MC8043P O O O OutpMC8043P Write data to output port O O O 43 InpMC8043P Read data from input port O O O SetEventMC8043P Set user function to handle an interrupt O x x 44 ResetEventMC8043P Release user function to handle an interrupt O x x n ReadEventMC8043P Read RR3 value of each axis right after the O x x 45 interrupt generated 2 Reset Command Function Name Description VC VB VB NET Page Nmc_Reset Reset MC8043P O O O 46 Nmc_Command Execute the command of the specified axis O O O 1 Nmc_Command_IP Execute the interpolation command O O O 3 Write Register Function Name Description VC VB VB NET Page Nmc_WriteRegO WRO Command Register Writing O O O 47 Nmc_WriteReg1
149. ter 0 amp Fixed Return Value As Long If the function succeeds the driver handle returns If the function fails the return value is NULL lt Example gt status OpenCard 0 amp 0 amp is fixed Open the board 0 CloseCard Terminate MC8043P Perform to MC8043P whose board number setting value of rotary switch on the board is 0 Input Parameter None Return Value As Long If the function succeeds the return value is nonzero If the function fails the return value is 0 lt Example gt status CloseCard Close the board 0 OutW Write 1 word 16 bit into output port Perform to MC8043P whose board number setting value of rotary switch on the board is 0 Input Parameter ByVal As Integer Write register number WRO WR7 ByVal As Long Data to be written Return Value None lt Example gt Call OutW WRO amp H8000 Soft reset the board Note The write register numbers WRO WR7 are defined in the MC8043P_DLL bas file InW Read out 1 word 16 bit from input port Perform to MC8043P whose board number setting value of rotary switch on the board is 0 Input Parameter ByVal As Integer Read register number RRO RR7 Return Value As Long 1 word read out from input port lt Example gt data InW RRO Read out the read register RRO Note The read register numbers RRO RR7 are defined in the MC8043P_DLL bas file 92 NOVA electronics MC8043P M93 9 1 4 4 VB6 0 When multiple MC8043P boards are used Wh
150. ter the updating is successfully completed the following dialog box opens then click Finish Upgrade Device Driver Wizard Completing the Upgrade Device D Driver Wizard O MC8043P Device Windows has finished installing the software for this device To close this wizard click Finish lt Back Cancel 31 NOVA electronics MC8043P M32 7 Check the updated driver s version in MC8043P Device Properties Open Driver Version txt file and check the version described in the 1 Driver Version and then check the updated version displayed in the following window Then click Driver Details button MC8043P Device Properties gt 8 Check the updated driver s file version in the following window Open Driver Version txt file and check the version described in the 2 Driver File Version and then check the updated version displayed in the following window Driver File Details WINNT SSystem32 Drivers MC8043P si 9 If multiple MC8043P boards are used update all the drivers of MC8043P Device under NOVA displayed in Device Manager 10 Restart your PC and the driver update will be finished 32 NOVA electronics 8 5 2 Windows XP MC8043P M33 1 Open Control Panel System Hardware tab Device Manager shown on the left below double click MC8043P Device under NOVA and then click the Driver tab to displa
151. terpolation stopped during driving because the driving speed is too fast to stack the next data VC TRUE Continue FALSE Not continue Can be omitted Default is FALSE VB True Continue False Not continue Return Value If the function succeeds the return value is CIP_END If the function fails the return value is the following Error code m Normal end CIP_END Continuous interpolation has been successfully completed m Error code CIP_CNT_ERR The number of the specified data is out of range CIP_ALREADY_EXEC BP interpolation or continuous interpolation is already running CIP_CMD_ERR The wrong command was specified CIP_STOP Continuous interpolation stopped during driving too fast to set next data CIP_USER_STOP The user aborted continuous interpolation CIP_DRIVE_ERR Error occurred in MC8043P during continuous interpolation When the error status was set to RRO 69 NOVA electronics MC8043P M70 Function Name Function and Content Example VC VB 2 axis continuous interpolation data Data Command Speed Finishing point 1 Finishing point 2 Center point 1 Center point 2 DATA_2CIP Data2Cip 2 CMD_IP_2ST 0 4500 0 0 0 2 axis linear interpolation CMD_IP_CCW 0 1500 1500 0 1500 CCW circular interpolation Nmc_WriteReg5 No 0x04 Axis assignment for interpolation Master axis X Second axis Y Ret Nmc_2CIPExec No Data2Cip 2 0x04 Execute
152. the interpolation axis Main axis X Second axis Y Call Nmc_Command_IP No CMD_IP_2ST Execute 2 axis linear interpolation drive 46 NOVA electronics MC8043P M47 Function Name Function and Content Nmc_WriteRegO Write data into WRO Command register vc void Nmc_WriteRegO int No long wdata VB Sub Nmc_WriteReg0 ByVal No As Long ByVal wdata As Long VB NET Sub Nmc_WriteRegO ByVal No As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board wdata Data to be written Return Value None Example VC Nmc_WriteRegO No 0x0120 Execute the direction fixed drive of X axis VB Call Nmc_WriteReg0 No amp H120 Nmc_WriteReg1 Write data into WR1 Mode register 1 vc void Nmc_WriteReg1 int No int Axis long wdata VB Sub Nmc_WriteReg1 ByVal No As Long ByVal Axis As Long ByVal wdata As Long VB NET Sub Nmc_WriteReg1 ByVal No As Integer ByVal Axis As Integer ByVal wdata As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Axis Axis to write data Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details wdata Data to be written Return Value None Example VC Nmc_WriteReg1 No AXIS_X 0x0002 Enable driving stop input signal INO X axis VB Call Nmc_WriteReg1 No AXIS_X amp H2 Nmc_WriteReg2 Write data int
153. the speed below the interpolation sometimes stopped Measurement Environment OS WindowsXP Japanese SP1 CPU Celeron R CPU 2 53 GHz Executed function Nmc_2BPExec When the application is switched during execution of interpolation function The number of interpolation data 100 Stable drive speed 70 PPS wWhen the window is never touched during execution of interpolation function The number of interpolation data 1 000 Stable drive speed 600 PPS Executed function Nmc_2CIPExec When the application is switched during execution of interpolation function One moving distance 1 000 pulse The number of interpolation data 100 Stable drive speed 5 000 PPS When the window is never touched during execution of interpolation function One moving distance 1 000 pulse The number of interpolation data 500 Stable drive speed 30 000 PPS 87 NOVA electronics MC8043P M88 m Notes for when developing multithread applications This chapter describes the notes for developing applications which work in multithread In Nmc_xxx function there are functions executing axis switching data writing into WR6 WR7 and data reading to RR6 RR7 Each Nmc_xxx function is as follows Functions executing axis switching Nmc Reset Nmc_WriteReg0 Nmc_ReadRegl Nmc_Range Nmc_ Pulse Nmc_Ep Nmec_ExpMode Nmc_ReadLp Nmc_2BPExec Nmc_2CIPExec Nmc_Range Nmc_ Pulse Nmc_Ep Nmec_ExpMode Nmc_2CIPExec Nmc_WriteReg6
154. ts COM amp LPT SB Processors Sound video and game controllers ee Storage volumes 9 System devices Universal Serial Bus controllers If Found New Hardware Wizard opens again the installation may not successfully be completed In this case remove the board MC8043P Device Properties General Driver Details Resources MC8043P M28 MC8043P Device Device type NOVA NOVA electronics PCI Slot 2 PCI bus 1 device 5 function 0 Manufacturer Location Device status This device is working properly If you are having problems with this device click Troubleshoot to start the troubleshooter Device usage Use this device enable according to steps at 8 4 and then reinstall from chapter 8 2 After the installation is successfully completed check the resource settings I O address and IRQ and conflicts Control Panel System Hardware tab Device Manager Properties Device Manager DER Fie Action View Help e gt MES e Be TEST Computer s Disk drives a Display adapters 23 DYD CD ROM drives IDE ATAJATAPI controllers lt Keyboards Mice and other pointing devices b Modems Z Monitors E9 Network adapters nova gt TERETE Y Ports COM amp LPT SB Processors Sound video and game controllers lt Storage volumes System devices Univers
155. tting both signals are disabled For nINPOS input signal set 1 0 to the D15 14 bit of mode register 2 nWR2 of MCX314As as low active and the n DRV bit of RRO register returns to 0 after waiting to flow level current from nINPOS signal For nALARM input signal set 1 0 to the D13 12 bit of nWR2 register as low level active and the signal becomes an alarm state when current flows out from nALARM signal pin For more details see chapter 2 9 5 and 4 5 of MCX314As user s manual MCX314As ney o VEX 12 24V 33K n INPOS TLP281 or equivalen 5V Bultjn fite A etna i es I Po Ez nALARM Delay time 512 u SEC default 7 Servo Motor Input Signal Circuit To enable this signal external power supply DC12 24V is needed When the board is powered on the built in integral filter of MCX314As shown above becomes the setting of signal delay time 512 u sec due to the default setting of Windows device driver provided by NOVA electronics This signal delay time can be changed for circumstances of system noise For more details see chapter 2 8 and 6 16 of MCX314As user s manual 3 7 Encoder Input Signal nNECAP nECAN nECBP nECBN nINOP nINON nECAP N nECBP N input signals are the input to count a real position counter of MCX314As by connecting to the 2 phase output signal of an encoder or that of a servo motor driver For more details see chapter 2 3 1 2 9 3 and 4 5 of MCX314As user s m
156. unction OpenMC8043P ByVal No As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Return Value VC Ifthe function succeeds the return value is TRUE If the function fails the return value is FALSE VB If the function succeeds the return value is nonzero If the function fails the return value is 0 Example VC status OpenMC8043P 0 Open the board 0 VB status OpenMC8043P 0 CloseMC8043P Terminate MC8043P vc BOOL CloseMC8043P int No VB Function CloseMC8043P ByVal No As Long As Long VB NET Function CloseMC8043P ByVal No As Integer As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board Return Value VC Ifthe function succeeds the return value is TRUE If the function fails the return value is FALSE VB If the function succeeds the return value is nonzero If the function fails the return value is 0 Example VC status CloseMC8043P 0 Close the board 0 VB status CloseMC8043P 0 CloseAlIMC8043P Terminate all the MC8043P vc BOOL CloseAlIMC8043P void VB Function CloseAlIIMC8043P As Long VB NET Function CloseAlIIMC8043P As Integer Input Parameter None Return Value VC Ifthe function succeeds the return value is TRUE If the function fails the return value is FALSE VB If the function succeeds the return value is nonzero If the function fails the return value is 0 Example V
157. urs at the stop All axes m Example of interrupt user function declaration void MC8043P_EventProcO void void MC8043P_EventProc1 LPVOID IpParameter ResetEventMC8043P Release user function to handle an interrupt By executing this function the user function is not called when an interrupt occurs vc BOOL ResetEventMC8043P int No VB cannot be used VB NET cannot be used Input Parameter No Board number setting value of rotary switch 0 9 on the board Return Value If the function succeeds the return value is TRUE If the function fails the return value is FALSE Example VC Nmc_WriteReg1 No AXIS_ALL 0x0000 No interrupt All axes status ResetEventMC8043P No 44 NOVA electronics MC8043P M45 Function Name Function and Content ReadEventMC8043P Read the value of RR3 of each axis right after an interrupt generation RR3 will be cleared after reading vc BOOL ReadEventMC8043P int No long Rr3X long Rr3Y long Rr3Z long Rr3U VB cannot be used VB NET cannot be used Input Parameter No Board number setting value of rotary switch 0 9 on the board Rr3X Pointer to a variable that receives the X axis RR3 value Rr3Y Pointer to a variable that receives the Y axis RR3 value Rr3Z_ Pointer to a variable that receives the Z axis RR3 value Rr3U Pointer to a variable that receives the U axis RR3 value Return Value If the function succeeds the return value is TRUE If the funct
158. witch 0 9 on the board Axis Axis to execute the command Assign AXIS_X AXIS_Y and so on Multiple axes can be assigned See Footnote 2 for more details cmd Command number Specify one command from Driving commands Other commands of Command Definition described in definition file 1 For direction fixed drive specify CMD_F_DRV_P 1 VC MC8043P_DLL H VB MC8043P_DLL bas VB NET MC8043P_DLL vb Return Value None Example VC Nmc_Command No AXIS_X CMD_F_DRV_P Execute the direction fixed drive of X axis VB Call Nmc_Command No AXIS_X CMD_F_DRV_P Nmc_Command_IP Execute interpolation command Write interpolation command into WRO vc void Nmc_Command_IP int No int cmd VB Sub Nmc_Command_IP ByVal No As Long ByVal cmd As Long VB NET Sub Nmc_Command_IP ByVal No As Integer ByVal cmd As Integer Input Parameter No Board number setting value of rotary switch 0 9 on the board cmd Command number Specify one command from Interpolation Commands of Command Definition described in definition file 1 For 2 axis linear interpolation drive specify CMD_IP_2ST 1 VC MC8043P_DLL H VB MC8043P_DLL bas VB NET MC8043P_DLL vb Return Value None Example VC Nmc_WriteReg5 No 0x0004 Set the interpolation axis Main axis X Second axis Y Nmc_Command_IP No CMD_IP_2ST Execute 2 axis linear interpolation drive VB Call Nmc_WriteReg5 No amp H0004 Set
159. with interpolation function MCX314As It can independently control 4 axes of either stepper motor or pulse type servo drives for position and speed controls In addition this IC can perform 2 3 axes linear interpolation CW CCW circular interpolation and 2 3 axes bit pattern interpolation MC8043P functional block diagram is shown as follows MC8043P consists of mainly 4 axes motion control IC MCX314As a PCI bus interface circuit and I O interface circuits of each axis X Y Z and U Therefore basic functions of this board all depend on MCX314 lt As so please refer to the user s manual of MCX314As regarding these functions X axis 1 0 Interface 1 Crystal Oscillator CLK xP Line Driver XP P N direction pulse output 16MHz xP 26031 XP P N direction pulse output l i Output Buffer A peace AL S06 XOUT7 4 general output 4 points 1 i i SiN VEX external power supply 0C12 24V XLMTPI Photo Coupler XLMT direction limit 3 f 1 i XLNT XLMT direction limit ages 1 decelerat XIN 1 bog XINS 1 decelera UAR stip WRN XINPOS e XINPOS servo in position obi KALARI XALARM servo alarm I i High speed A2 0 XEOM Photo Coupler Iot XECAP N encoder A phase XECB e lt XECBP N encoder B phase i XINO e l TLP1 15A XINOP N encoder Z phase APIC21 MCX31 4As je XEXOP direction drivi PCI PCI Interface ADNE Photo Coupler OKSO ON CENNE l Bus A
160. xe VCSampleG exe MC8043P M100 Sample program F Application class member function Dialog class member function Application class declaration Dialog class declaration MC8043P Control function sample MC8043P Control function declaration MC8043P DLL Library file MC8043P DLL Header file function declaration definition Project workspace for VC sample program VC6 0 only Trajectory figure of continuous interpolation executed by this application Executable file Sample program G Application class member function Dialog class member function Application class declaration Dialog class declaration MC8043P DLL Library file MC8043P DLL Header file function declaration definition Project workspace for VC sample program VC6 0 only Executable file 100 NOVA electronics MC8043P M101 9 3 Development Procedure 9 3 1 When developing applications with VC VC 6 0 VC NET 2003 MC8043P lib and MC8043P_DLL h files are used in MC8043P application These two files are for VC 6 0 or later E When newly developing MC8043P applications 1 Copy two files MC8043P lib and MC8043P_DLL h in Lib VC6 folder to the application s folder to development 2 Add MC8043P_DLL h to your project in VC Also include MC8043P_DLL h to the source file using API function 3 For VC 6 0 users go to Project Settings Link and then designate MC8043P lib to Object library modules See Fig 9
161. y the window shown on the right below 2 Click Update Driver Device Manager DER File View Help Action MC8043P Device Properties General Driver Details Resources e r e2a 8 2 P Computer J Disk drives Display adapters 4 DVD CD ROM drives IDE ATAJATAPI controllers w Keyboards D Mice and other pointing devices b Modems Monitors E9 Network adapters p Nova gt TREE Y Ports COM amp LPT MR Processors Sound video and game controllers ee Storage volumes z System devices Universal Serial Bus controllers MC8043P Device Driver Provider NOYA electronics 5 30 2005 2 0 0 0 Driver Date Driver Version Digital Signer Not digitally signed Driver Details Update Driver Roll Back Driver To view details about the driver files To update the driver for this device If the device fails after updating the driver roll back to the previously installed driver To uninstall the driver Advanced Cancel 3 For Windows XP service pack 2 users the following wizard appears Click No not this time and then click Next to continue For Windows XP service pack 1 users the following wizard does not appear so skip this step Hardware Update Wizard Welcome to the Hardware Update Wizard Windows will search for current and updated software by looking on your computer on the

Download Pdf Manuals

image

Related Search

Related Contents

making yonanas  Printing SAPScript with various codepages_090724  LA400 User`s Manual - Advanced Thermoelectric    deutsch  Sony XR-CA420 User's Manual  One For ALL URC 9800 User's Manual  Senseo Senseo HD7825/31 coffee maker  Alpine CHA-S634 car media receiver    

Copyright © All rights reserved.
Failed to retrieve file