Home

MacComm OCX Control 1.05 User Manual JVL

image

Contents

1. anoProgram in Address in FileName lanoWrite in Address lanoStop in Address lanoReset in Address lanoResetWait in Address anoDebug in Address out State out Inputs out Outputs out Time out Count out ModeCmd RxPReset in Address RxPResetWait in Address RxPNOOP in Address out Value RxPStart in Address RxPStop in Address RxPPause in Address RxPStep in Address in MinAddress in MaxAddress RxPSetOutputs in Address in Outputs in Mask ReadStatus in Address out Status out Position out ErrCount WriteGroup in Group in RegisterNo in Value AboutBox ZZZZZZZZ Properties ComPort Retries GrpSends Baud JVL Industri Elektronik A S User Manual MacComm OCX Control MacComm OCX Control 1 05 User Manual Method Descriptions In the examples MacComm is an instance of the MacComm OCX NOTE All methods will block the calling thread until completed OpenPort Return tvpe Boolean Returns true if open was successful Description Use this method to open the port Example s C Opening the port bool Result MacComm OpenPort BASIC Opening the port Dim Result As Boolean Result MacComm OpenPort ClosePort Description Use this method to close the port Example s Crt Closing the port MacComm ClosePort BASIC Closing the port MacComm ClosePort JVL Industri Ele
2. 16 bit unsigned short integer Address Address of the motor 255 for broadcast 16 bit unsigned short integer Page What page is to be read 0 3 VARIANT Data Array of Bytes 128 elements of VT UII Description Sends a page to the RX module Example s Crt Send page 0 VARIANT Data MacComm NanoPut 255 0 Data BASIC Send Page 0 dim Data as VARIANT MacComm NanoPut 255 0 Data JVL Industri Elektronik A S User Manual MacComm OCX Control 18 MacComm OCX Control 1 05 User Manual NanoProgram in Address in FileName Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast BSTR FileName HEX file to be sent to RX module Description Reads the HEX file and writes it to the RX module Example s C Send C File hex MacComm NanoProgram 255 C NFile hex BASIC Send C File hex MacComm NanoProgram 255 C File hex NanoStop in Address Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast Description Stops the program Example s Cre Stop progam MacComm NanoStop 255 BASIC Stop progam MacComm NanoStop 255 JVL Industri Elektronik A S User Manual MacComm OCX Control 19 MacComm OCX Control 1 05 User Manual NanoReset in Address Parameters Type Name Description 16 bi
3. RxPPause 255 BASIC Pause program in RxP module MacComm RxPPause 255 RxPStep in Address in MinAddress in Max Address Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast 16 bit unsigned short integer MinAddress Lower address of code area 16 bit unsigned short integer MaxAddress High address of code area Description Continues execution of the RxP Program until program pointer is outside specified area MinAddress MaxAddress Example s C Step through program until outside 0x1C 0x23 MacComm RxPStep 255 0x1C 0x23 BASIC Step through program until outside amp H1C amp H23 MacComm RxPStep 255 H1C amp H23 JVL Industri Elektronik A S User Manual MacComm OCX Control 24 MacComm OCX Control 1 05 User Manual RxPSetOutputs in Address in Outputs in Mask Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast 16 bit unsigned short integer Outputs binary representation of the Outputs 16 bit unsigned short integer Mask Output mask Description Sets or clears the outputs according to the mask and output values i e binary values Output value of 1010 and Mask of 1100 sets output 4 and clears output 3 Output 1 and 2 are not modified since they are masked out Example s CFR Set output 1 and clear output 4 MacComm RxPSet
4. SetFactorsBig in PositionFactor in AccelerationFactor in VelocityFactor 16 SetMACType in Address in TIP ala kati 17 GetModuleType in Address out ModuleType out Firm WareVersion 17 NanoGet in Address in Page out Data neenennnnnnenennenenanennanenena nanna 18 NanoPut in Address in Page in Data ss nenennnnennnnznenanenznnnnnnnnnnnnnannnznna 18 NanoProgram in Address in FileName ooooocnnnccnocccnonaconccionoconnconnoconoconnconn conan ccon con nccnnoos 19 Nano Stope MA kostma el 9 kr kts ea el 10 19 NanoReset litij Addis akt alas oxen lente E TS aR 20 NanoResetWaitlin Ad a oia 20 NanoDebug in Address out State out Inputs out Outputs out Time out Count out ModeCmad 21 RxPNOOP in Address out VA A eh 22 RXPRes t AAA O AM Am tm a 22 RXPRESEEW IE Hn Address tas ja iks aal a a atu i al a is 23 REPASO LO 23 RXPSt p Add O A EA A A 23 RKP Pause al AAAFESS ii A a 24 RxPStep in Address in MinAddress in Max AddresS oooooonocninnnnooccconcconnconncconccnnnocanoco 24 RxPSetOutputs in Address in Outputs in Mask 25 ReadStatus in Address out Status out Position out ErrCount me 26 WriteGroup in Group in ParamNum in Value 27 kasta l ti rs sek keda algatatud ds ANA A ia v idan ud een ee 28 Adding MacComm OCX to the program ccccccccesscsssessseesseesecesece
5. address 4 MacComm SetMACT ype 4 TRUE BASIC Set MAC80 on address 4 MacComm SetMACType 4 FALSE GetModuleType in Address out ModuleType out FirmWareVersion Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast 16 bit unsigned short integer ModuleType What type of module is it 16 bit unsigned short integer FWVersion FirmWare version Description Reads module information from the MAC motor The values of ModuleType are 1 MAC00 Rx module NanoPLC 2 MAC00 FPx module Profibus 3 MAC00 FCx module CAN Open Example s Ca Read page 0 VARIANT Data MacComm NanoGet 255 0 Data BASIC Read Page 0 dim Data as VARIANT MacComm NanoGet 255 0 Data JVL Industri Elektronik A S User Manual MacComm OCX Control 17 MacComm OCX Control 1 05 User Manual NanoGet in Address in Page out Data Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast 16 bit unsigned short integer Page What page is to be read VARIANT Data Array of Bytes 128 elements of VT UII Description Reads a page from the RX module Example s Guzi Read page 0 VARIANT Data MacComm NanoGet 255 0 Data BASIC Read Page 0 dim Data as VARIANT MacComm NanoGet 255 0 Data NanoPut in Address in Page in Data Parameters Tvpe Name Description
6. amount of times the property GrpSends has been set to Description Use this method to write a parameter to a Macmotor register This method can also be used for accessing the module registers by using ParamNums above 256 Register 1 in the module can be accessed by writing to ParamNum 257 Value is one of the following types cast to a long integer Word 16 bit unsigned integer Integer 16 bit signed integer LongInt 32 bit signed integer Fixed4 16 bit signed fixed point Unit 1 4096 Fixed8 16 bit signed fixed point Unit 1 256 Fixed16 32 bit signed fixed point Unit 1 65536 Fixed24 32 bit signed fixed point Unit 1 256 Example s C Setting operation mode Parameter number 2 to Position mode 2 in group 1 bool Result MacComm WriteGroup 1 2 2 Setting Position Parameter 3 P SOLL to 4096 Value 4096 in group 1 bool Result MacComn WriteGroup 1 3 4096 BASIC Setting operation mode Parameter number 2 to Position mode 2 in group 1 Dim Result As Boolean Result MacComm1 WriteGroup 1 2 2 Setting Position Parameter 3 P SOLL to 4096 Value 4096 in group 1 Dim Result As Boolean Result MacComm1 WriteGroup 1 3 4096 JVL Industri Elektronik A S User Manual MacComm OCX Control 27 MacComm OCX Control 1 05 User Manual Installation The MacComm OCX and required DLLs are installed automatically by running Setup exe and following the onscreen prompts You have the
7. mode Parameter number 2 Result MacComm ReadParameter 255 2 LocalValue Getting position Parameter 10 P_IST Result MacComm ReadParameter 255 10 Local Value JVL Industri Elektronik A S User Manual MacComm OCX Control MacComm OCX Control 1 05 User Manual ReadParameterAlternate in Address in ParamNum out Value Parameters Type Name Description 16 bit signed integer Address Address of the motor 255 for broadcast 16 bit signed integer ParamNum Parameter number 32 bit floating point pointer Value Value to be read Pointer Return type Boolean Returns true if read was successful It will try the amount of times the property Retries has been set to before returning false Description Use this method to read a parameter from a Macmotor register This method uses the factors for Acceleration Position and Velocity registers which can be set by calling SetFactors Some of the other registers are converted using predefined factors See SetFactors The rest just pass through Types are handled automatically by this method Example s Che Getting operation mode Parameter number 2 float Value bool Result MacComm ReadParameterAlternate 255 2 8 Value Getting position Parameter 10 P_ IST multiplied with Positionfactor float Value bool Result MacComm ReadParameterAlternate 255 3 8 Value BASIC Common dim statements Dim LocalValue As Single Dim Result
8. As Boolean Getting operation mode Parameter number 2 Result MacComm ReadParameterAlternate 255 2 LocalValue Getting position Parameter 10 P_IST multiplied with Positionfactor Result MacComm ReadParameterAlternate 255 10 LocalValue JVL Industri Elektronik A S User Manual MacComm OCX Control 7 MacComm OCX Control 1 05 User Manual WriteParameter in Address in ParamNun in Value Parameters Type Name Description 16 bit signed integer Address Address of the MAC motor Use 255 to broadcast 16 bit signed integer ParamNum Parameter number 32 bit signed integer Value Value to be written Return type Boolean Returns true if write was successful It will try the amount of times the property Retries has been set to before returning false Description Use this method to write a parameter to a Macmotor register This method can also be used for accessing the module registers by using ParamNums above 256 Register 1 in the module can be accessed by writing to ParamNum 257 Value is one of the following types cast to a long integer Word 16 bit unsigned integer Integer 16 bit signed integer LongInt 32 bit signed integer Fixed4 16 bit signed fixed point Unit 1 4096 Fixed8 16 bit signed fixed point Unit 1 256 Fixed16 32 bit signed fixed point Unit 1 65536 Fixed24 32 bit signed fixed point Unit 1 256 Example s Crk Setting operation mode Parameter n
9. MacGomm OCX Control 1 05 User Manual Windows programs MAC motors JVL Industri Elektronik A S LB0051 05GB 29 3 05 MacComm OCX Control 1 05 User Manual JVL Industri Elektronik A S User Manual MacComm OCX Control MacComm OCX Control 1 05 User Manual Contents Foreword neari AS A ke ota Male wt atk ache hire a kh Johan tee Intettaceoverviewi i Ai a i e i a SAS ia RIE tan te Kate da daa T AA a taa ELTS TOORE f eta l I AT 4 POPU ISS i a ke o A TA aasadest tala 4 Method Descriptions 44 21 0tedikehtatsute tati sdheslavavavs Je nar tare tanel tanka seba a cod vaev kihis oaas pana E ge 9 Open Port NESS A ta TUD 5 CLOSER ORC e e anti 5 ReadParameter in Address in ParamNum out Value 6 ReadParameterAlternate in Address in ParamNum out Value T WriteParameter in Address in ParamNum in Value 8 WriteParameterAlternate in Address in ParamNum in Value 9 GetParamNumFromName in Address in ParamName cccccccssccssscccesseeeeseeeeeseeeeees 10 A oria A A liina ese 10 GetLastError A A A nari iN acre hen ae aires 11 GetkastErrorStr in EXC aa 11 GetParameterType 1n Address in ParamNum ikisser a ran ap lI ea jsa 12 Rescata 13 a AAA A ai Mak a a 13 WriteToFlash in o y A A OD tn 14 Write LOF ASH Wat AE a o aa AE A VEE Aaea 14 SetFactors in PositionFactor in AccelerationFactor in VelocityFactor 15
10. Outputs 255 0x01 0x09 BASIC Set output 1 and clear output 4 MacComm RxPSetOutputs 255 1 9 JVL Industri Elektronik A S User Manual MacComm OCX Control 25 MacComm OCX Control 1 05 User Manual ReadStatus in Address out Status out Position out ErrCount Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 16 bit signed integer Status 32 bit signed integer Position 16 bit signed integer ErrCount Amount of Errors received since pwr on Return type Boolean Returns true if Read was successful Description Use this method to get the status of a Macmotor Example s C Read status for address 7 short Status ErrCount long Position bool Result MacComm ReadStatus 7 Status Position ErrCount BASIC Read status for address 7 Dim Result As Boolean Dim Status As Integer Dim Position As Long Dim ErrCount As Integer Result MacComm1 ReadStatus 7 Status Position ErrCount JVL Industri Elektronik A S User Manual MacComm OCX Control 26 MacComm OCX Control 1 05 User Manual WriteGroup in Group in ParamNum in Value Parameters Type Name Description 16 bit signed integer Group Group of MAC motors 16 bit signed integer ParamNum Parameter number 32 bit signed integer Value Value to be written Return type Boolean Returns true if write was successful It will send the command the
11. has been set to before returning false Description Resets MAC motor to last flashed values Returns as soon as the Reset command has been sent to the MAC motor Example s CEF Reset MAC motor bool Result MacComm Reset 255 BASIC Reset MAC motor Dim Result As Boolean Result MacComm Reset 255 ResetWait in Address Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast Return type Boolean Returns true if reset was successful It will try the amount of times the property Retries has been set to before returning false Description Resets MAC motor to last flashed values Returns when MAC motor is ready Example s C Reset MAC motor bool Result MacComm Reset 255 BASIC Reset MAC motor Dim Result As Boolean Result MacComm Reset 255 JVL Industri Elektronik A S User Manual MacComm OCX Control 13 MacComm OCX Control 1 05 User Manual WriteToFlash in Address Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast Return type Boolean Returns true if flashing was successful It will try the amount of times the property Retries has been set to before returning false Description Writes MAC registers to Flash memory Returns as soon as the Flash command has been sent to the MAC motor Example s Cr Write regis
12. igned integer Return value indicates what type the parameter is stored as internally in the MAC Motor 1 Invalid Invalid parameter 0 Word 16 bit unsigned integer 1 Integer 16 bit signed integer 2 LongInt 32 bit signed integer 3 Fixed4 16 bit signed fixed point Unit 1 4096 4 Fixed8 16 bit signed fixed point Unit 1 256 5 Fixed16 32 bit signed fixed point Unit 1 65536 6 Fixed24 32 bit signed fixed point Unit 1 256 Description Use this method to determine how a parameter should be sent The integer types should just be used as parameters The Fixed4 type should be converted to an integer by multiplying with 4096 The Fixed8 type should be converted to an integer by multiplying with 256 The Fixed16 type should be converted to an integer by multiplying with 65536 The Fixed24 type should be converted to an integer by multiplying with 256 Example s CEE Get Parameter 100s type short Type MacComm GetParameterType 100 BASIC Get Parameter 100s type Dim ParameterType As Integer ParameterType MacComm GetParameterType 100 JVL Industri Elektronik A S User Manual MacComm OCX Control 12 MacComm OCX Control 1 05 User Manual Reset in Address Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast Return type Boolean Returns true if reset was successful It will try the amount of times the property Retries
13. ik A S User Manual MacComm OCX Control 10 MacComm OCX Control 1 05 User Manual GetLastError Return type 32 bit signed integer Returns an error code like the Windows GetLastError but with some additions Description Use this method to retrieve the error code for the last error Example s CHF Getting last error code unsigned short ErrorCode MacComm GetLastError BASIC Getting last error code Dim ErrorCode As Integer ErrorCode MacComm GetLastError GetLastErrorStr in ErrorCode Parameters Type Name Description 32 bit signed integer ErrorCode Errorcode to be converted to a string Return type String Returns an error code description like the Windows GetLastError but with the same additions as GetLastError Description Use this method to retrieve a description of an error code Example s Crh Get description of passed error code CString Text MacComm GetLastErrorStr MacComm GetLastError BASIC Getting last error code Dim Description As String Description MacComm GetLastErrorStr MacComm GetLastError JVL Industri Elektronik A S User Manual MacComm OCX Control 11 MacComm OCX Control 1 05 User Manual GetParameterType in Address in ParamNum Parameters Type Name Description 16 bit signed integer Address Address of the MAC motor 16 bit signed integer ParamNum Parameter number Return type 16 bit s
14. ktronik A S User Manual MacComm OCX Control MacComm OCX Control 1 05 User Manual ReadParameter in Address in ParamNum out Value Parameters Type Name Description 16 bit signed integer Address Address of the motor 255 for broadcast 16 bit signed integer ParamNum Parameter number 32 bit signed integer pointer Value Value to be read Pointer Return type Boolean Returns true if read was successful It will try the amount of times the property Retries has been set to before returning false Description Use this method to read a parameter from a Macmotor register This method can also be used for accessing the module registers by using ParamNums above 256 Register 1 in the module can be accessed by reading ParamNum 257 Value is one of the following types cast to a long integer Word 16 bit unsigned integer Integer 16 bit signed integer LongInt 32 bit signed integer Fixed4 16 bit signed fixed point Unit 1 4096 Fixed8 16 bit signed fixed point Unit 1 256 Fixed16 32 bit signed fixed point Unit 1 65536 Fixed24 32 bit signed fixed point Unit 1 256 Example s Cr Getting operation mode Parameter number 2 long Value bool Result MacComm ReadParameter 255 2 8 Value Getting position Parameter 10 P_IST long Value bool Result MacComm ReadParameter 255 3 8 Value BASIC Common dim statements Dim LocalValue As Long Dim Result As Boolean Getting operation
15. manual To initialize the OCX the following are required e Setting ComPort to wanted COM port number e Calling SetMACType to set MAC type only required for MAC 400 800 e Calling OpenPort Now it is possible to use the various commands for setting retrieving values e Call ReadParameterAlternate to read a value e Call WriteParameterAlternate to set a value e Etc To close the communications do the following e Call ClosePort JVL Industri Elektronik A S User Manual MacComm OCX Control 3 MacComm OCX Control 1 05 User Manual Interface overview Methods OpenPort ClosePort ReadParameter in Address in ParamNum out Value ReadParameterAlternate in Address in ParamNum out Value WriteParameter in Address in ParamNum in Value WriteParameterAlternate in Address in ParamNum in Value GetParamNumFromName in Address in ParamNum GetLastError GetLastErrorStr in long ErrorCode GetParameterType in Address in ParamNum Reset in Address ResetWait in Address WriteToFlash in Address WriteToFlash Wait in Address SetFactors in PositionFactor in AccelerationFactor in VelocityFactor SetFactorsBig in PositionFactor in AccelerationFactor in VelocityFactor SetMACType in Address in Type GetModuleType in Address out ModuleType out Firm WareVersion anoGet in Address in Page out Data lanoPut in Address in Page in Data
16. nthe menu Tools click Customize Toolbox 2 Find MacComm OCX Control module and put a checkmark besides it and click OK The MacComm OCX is now available in the Toolbox When put on a form the properties page of the object can be used to set the startup values for the 2 properties Retries ComPort baudrate and Group sends Borland C Builder 6 0 1 In the menu Component click Import ActiveX Control 2 Select MacComm ActiveX Control module in the lists of components 3 Press the install button 4 On the page Into existing package select the dclusr bpk file This should be default and click OK 5 Select yes to rebuild the package 6 The ActiveX should now be available in the tool palette on the ActiveX page LabVIEW 7 0 1 Place an ActiveX container on your Front Panel 2 Right click it and select Insert ActiveX object 3 Select MacComm Control from the list 4 Connect it to a Property node and use this to setup the properties 5 Connect it to an Invoke node and use this to call the methods JVL Industri Elektronik A S User Manual MacComm OCX Control 29 MacComm OCX Control 1 05 User Manual Custom Errors Hex value Description 2000 0000 Serial port could not be initialized 2000 0001 Serial port is not open 2000 0002 Could not write required Bytes to serial port 2000 0003 An
17. o Position mode Value 2 bool Result MacComn WriteParameterAlternate 255 2 2 Setting Position Parameter 3 P SOLL to 4000 divided by Positionfactor Value 4000 bool Result MacComn WriteParameterAlternate 255 3 4000 BASIC Setting operation mode Parameter number 2 to Position mode Value 2 Dim Result As Boolean Result MacComm1 WriteParameterAlternate 255 2 2 Setting Position Parameter 3 P SOLL to 4000 divided by Positionfactor Value 4000 Dim Result As Boolean Result MacComml WriteParameterAlternate 255 3 4000 JVL Industri Elektronik A S User Manual MacComm OCX Control 9 MacComm OCX Control 1 05 User Manual GetParamNumFromName in Address in ParamName Parameters Type Name Description 16 bit signed integer Address Address of the MAC motor String ParamName Parameter name Return type 16 bit signed integer Returns parameter number or 0 if not found Description Use this method to retrieve the parameter number from the name Example s CE Getting last error code unsigned short ParamNum MacComm GetParamNumFromName 255 P IST BASIC Getting last error code Dim ParamNun As Integer ParamNum MacComm GetParamNumFromName 255 P IST AboutBox Description Shows a dialog about the program Example s C Show the about box MacComm AboutBox BASIC Show the about box MacComm AboutBox JVL Industri Elektron
18. odule start progam unsigned short State Inputs Outputs ModeCmd unsigned long Time Count MacComm NanoDebug 255 State Inputs Outputs Time Count ModeCmd BASIC Reset module start progam dim State Inputs Outputs ModeCmd as Integer dim Time Count as Long MacComm NanoReset 255 State Inputs Outputs Time Count ModeCmd JVL Industri Elektronik A S User Manual MacComm OCX Control 21 MacComm OCX Control 1 05 User Manual RxPNOOP in Address out Value Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast 16 bit unsigned short integer Value Status information and inputs Description Gets Input and Status Value consists of bits Description 0 7 Inputs 1 8 8 Error 9 In position 10 11 Reserved 12 15 Outputs 1 4 Example s C Get inputs unsigned short Value MacComm RxPNOOP 255 Value Value Value amp 0xFF BASIC Get inputs dim Value as integer MacComm RxPNOOP 255 Value Value Value and 255 RxPReset in Address Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast Description Resets RxP module Returns immediately after the command has been sent Example s CH Reset module MacComm RxPReset 255 BASIC Reset module MacComm RxPReset 255 JVL Industri Elektronik A S User Manual MacComm OCX Cont
19. option to install a Visual Basic sample and a LabVIEW sample along with the OCX It can also be done manually by copying the following Microsoft redistributable DLLs to the Windows System folder e OLEAUT32 DLL e OLEPRO32 DLL MacComm OCX should be placed in a directory called MacComm in the Windows folder and registered with RegSvr32 i e Regsvr32 C Windows MacComm MacComm ocx JVL Industri Elektronik A S User Manual MacComm OCX Control 28 MacComm OCX Control 1 05 User Manual Adding MacComm OCX to the program Visual Basic 6 1 Inthe menu Projects click Components 2 Make sure the Selected Items Only checkbox is NOT selected 3 Find MacComm ActiveX Control module and put a checkmark besides it and click OK The MacComm OCX is now available in the controls bar When put on a form the properties page of the object can be used to set the startup values for the 2 properties Retries ComPort baudrate and Group sends Visual C 6 1 Inthe menu Projects choose Add To Project and click Components and Controls 2 Go into the folder Registered ActiveX Controls and click MacComm Control 3 Click Insert and two times OK followed by a Close 3 The MacComm OCX is now available in the controls bar When put on a dialog the properties page of the object can be used to set the startup values for the 2 properties Retries ComPort baudrate and Group sends Visual NET 1 I
20. rol 22 MacComm OCX Control 1 05 User Manual RxPResetWait in Address Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast Description Resets RxP module Returns when the module is ready Example s C Reset module MacComm RxPResetWait 255 BASIC Reset module MacComm RxPResetWait 255 RxPStart in Address Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast Description Starts the program in the RxP module Example s CHF Start program in RxP module MacComm RxPStart 255 BASIC Start program in RxP module MacComm RxPStart 255 RxPStop in Address Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast Description Stops the program in the RxP module Example s Cre Stop program in RxP module MacComm RxPStop 255 BASIC Stop program in RxP module MacComm RxPStop 255 JVL Industri Elektronik A S User Manual MacComm OCX Control 23 MacComm OCX Control 1 05 User Manual RxPPause in Address Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast Description Pauses the program in the RxP module Example s Ch Pause program in RxP module MacComm
21. rted but these factors are fixed 7 T_SOLL 100 1023 Percent 8 P_SIM 1 16 Encoder counts 16 2T 1 22 Percent assuming I2TLIM is 2200 18 UIT 1 6 Percent assuming UITLIM is 600 41 T_HOME 100 1023 Percent 77 80 T1 4 100 1023 Percent 121 VF_OUT 100 1023 Percent 122 ANINP 10 1023 Volts 123 ANINP_OFFSET 10 1023 Volts 124 ELDEGN_OFFSET 360 2048 Degrees 125 ELDEGP OFFSET 360 2048 Degrees 143 ELDEG_IST 360 2048 Degrees 151 U_SUPPLY 0 0537 Volts Example s C Set Position factor to 1 4096 Converts Pulses to revolutions and disable the others MacComm SetFactors float 1 4096 1 1 BASIC Set Position factor to 1 4096 Converts Pulses to revolutions and disable the others MacComm SetFactors 1 4096 1 1 JVL Industri Elektronik A S User Manual MacComm OCX Control 15 MacComm OCX Control 1 05 User Manual SetFactorsBig in PositionFactor in AccelerationFactor in VelocityFactor Parameters Type Name Description 16 bit floating point Pos Position Factor 16 bit floating point Acc Acceleration Factor 16 bit floating point Vel Velocity Factor Description Sets factors used by ReadParameterAlternate and WriteParameterAlternate If a value of 0 is passed the previous factor is retained The defaults are Name Factor Resulting unit PositionFactor 1 Pulses AccelerationFactor 277 922 RPM s VelocityFactor 0 360938 RPM The following registers are also conve
22. rted but these factors are fixed 7 T_SOLL 100 1023 Percent 8 P_SIM 1 16 Encoder counts 21 U 24V 74 47 Volts 29 DEGC 0 05 4096 Degrees 31 DEGCMAX 0 05 4096 Degrees 41 T HOME 100 1023 Percent 46 T REG P 100 1023 Percent 77 TO0 100 1023 Percent 78 TO1 100 1023 Percent 79 TQ2 100 1023 Percent 80 TQ3 100 1023 Percent 169 VF_OUT 100 1023 Percent 170 ANINP 10 2047 Percent 171 ANINP_OFFSET 10 2047 Percent 172 ELDEG_OFFSET 360 1143 Electrical degrees 176 MAN ALPHA 360 1143 Electrical degrees 190 ELDEG IST 360 1143 Electrical degrees 191 V_ELDEG 360 1143 Electrical degrees 198 U BUS 325 3 400 Volts 199 U BUS OFFSET 325 3 400 Volts Example s C Set Position factor to 1 8000 Converts Pulses to revolutions and disable the others MacComm SetFactorsBig float 1 8000 1 1 BASIC Set Position factor to 1 8000 Converts Pulses to revolutions and disable the others MacComm SetFactorsBig 1 8000 1 1 JVL Industri Elektronik A S User Manual MacComm OCX Control 16 MacComm OCX Control 1 05 User Manual SetMACType in Address in Type Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast BOOL Type true if it is a MAC 400 or MAC 800 Description Sets MAC motor type Default is 0 Type can have the following values MAC50 95 140 141 1 MAC400 800 Example s CFR Set MAC400 on
23. seceseceseeeseesseceseceseceseseseeeseenseeeaeenseenseeaes 29 VS JE To OAK MM A IPA ART 29 VISUAL EG e a ea G aa 29 NSU NIE Ue cane aia es E in i a Tr ta e tad 29 B flandCA F Baer OO l a a a a E R 29 Lab VIEW TDS SA ia a AA ajale 29 Custom NA 30 JVL Industri Elektronik A S User Manual MacComm OCX Control 1 MacComm OCX Control 1 05 User Manual JVL Industri Elektronik A S User Manual MacComm OCX Control MacComm OCX Control 1 05 User Manual Foreword MacComm OCX has been developed to provide an easy way of interfacing to the MAC motors from various Windows applications To use the MacComm OCX you only need a development environment that supports ActiveX components previously called OLE controls This includes MS Excel MS Visual Studio Borland C Builder Borland Delphi LabView and many more By using this OCX you do not need to worry about setting up the COM port settings such as baud rate start bits stop bits databits parity CTS RTS etc These settings are handled automatically by the OCX All you need is to tell what COM port is used and what addresses the MAC motors are connected The MAC motor address is only required when more than one MAC motor is connected to the same serial cable Otherwise address 255 is a broadcast address where the MAC motor will react regardless of configured address First you need to add the OCX to your project See Installation instructions later in this
24. swer is not of expected length 2000 0004 Invalid accept from mac motor 2000 0005 Startsync error in reply 2000 0006 Address mismatch in reply 2000 0007 Parameter number mismatch in reply 2000 0008 Parameter length mismatch in reply 2000 0009 Inversion check failed on value 2000 000A Endsync error in reply 2000 000B Unspecified error 2000 000C Error entering safe mode 2000 000D Timeout JVL Industri Elektronik A S User Manual MacComm OCX Control 30
25. t unsigned short integer Address Address of the motor 255 for broadcast Description Resets RX module which also starts the program Returns immediately after the command has been sent Example s C Reset module start progam MacComm NanoReset 255 BASIC Reset module start progam MacComm NanoReset 255 NanoResetWait in Address Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast Description Resets RX module which also starts the program Returns when the module is ready Example s C Reset module start progam MacComm NanoResetWait 255 BASIC Reset module start progam MacComm NanoResetWait 255 JVL Industri Elektronik A S User Manual MacComm OCX Control 20 MacComm OCX Control 1 05 User Manual NanoDebug in Address out State out Inputs out Outputs out Time out Count out ModeCmd Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast 16 bit unsigned short integer State 16 bit unsigned short integer Inputs Inputs in binary format 16 bit unsigned short integer Outputs Outputs in binary format 32 bit unsigned long integer Time Time module has been running 32 bit unsigned long integer Count 16 bit unsigned short integer ModeCmd Description Reads information for debugging Example s CFt Reset m
26. ters to flash bool Result MacComn WriteToFlash 255 BASIC Write registers to flash Dim Result As Boolean Result MacComm WriteToFlash 255 WriteToFlashWait in Address Parameters Type Name Description 16 bit unsigned short integer Address Address of the motor 255 for broadcast Return type Boolean Returns true if flashing was successful It will try the amount of times the property Retries has been set to before returning false Description Writes MAC registers to Flash memory Returns when MAC motor is ready Example s C Write registers to flash bool Result MacComm WriteToFlashWait 255 BASIC Write registers to flash Dim Result As Boolean Result MacComm WriteToFlash Wait 255 JVL Industri Elektronik A S User Manual MacComm OCX Control 14 MacComm OCX Control 1 05 User Manual SetFactors in PositionFactor in AccelerationFactor in VelocityFactor Parameters Type Name Description 16 bit floating point Pos Position Factor 16 bit floating point Acc Acceleration Factor 16 bit floating point Vel Velocity Factor Description Sets factors used by ReadParameterAlternate and WriteParameterAlternate Ifa value of 0 is passed the previous factor is retained The defaults are Name Factor Resulting unit PositionFactor 1 Pulses AccelerationFactor 248 3 RPM s VelocityFactor 0 4768 RPM The following registers are also conve
27. umber 2 to Position mode Value 2 bool Result MacComn WriteParameter 255 2 2 Setting Position Parameter 3 P SOLL to 4096 Value 4096 bool Result MacComn WriteParameter 255 3 4096 BASIC Setting operation mode Parameter number 2 to Position mode Value 2 Dim Result As Boolean Result MacComm1 WriteParameter 255 2 2 Setting Position Parameter 3 P SOLL to 4096 Value 4096 Dim Result As Boolean Result MacComm1 WriteParameter 255 3 4096 JVL Industri Elektronik A S User Manual MacComm OCX Control MacComm OCX Control 1 05 User Manual WriteParameterAlternate in Address in ParamNum in Value Parameters Type Name Description 16 bit signed integer Address Address of the MAC motor Use 255 to broadcast 16 bit signed integer ParamNum Parameter number 32 bit floating point Value Value to be written Return type Boolean Returns true if write was successful It will try the amount of times the property Retries has been set to before returning false Description Use this method to write a parameter to a Macmotor register This method uses the factors for Acceleration Position and Velocity registers which can be set by calling SetFactors Some of the other registers are converted using predefined factors See SetFactors The rest just pass through Types are handled automatically by this method Example s Che Setting operation mode Parameter number 2 t

Download Pdf Manuals

image

Related Search

Related Contents

MW100 Data Acquisition Unit Operation Guide  Manuale installazione e programmazione - FITRE SpA  Manuel de l`utilisateur InfoView  Bedienungsanleitung Instruction manual Mode d'emploi  IdeaParLedZoomWHITEmanual    Singer S16 User's Manual  Cisco Systems OL-20949-01 User's Manual  

Copyright © All rights reserved.
Failed to retrieve file