...
Scroll Ignore | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Version:
|
General Setup
The following connections are required
- RJ45 network connector can go to either IN or OUT connector as the Ethernet controller is setup as a switch.
- Programming ribbon connector connects to i-Jet.
- 4 pin power connectors to 24V power supply. Power supply is wired in picture below.
- USB on the motor is not required.
- This is used to configure the network setup. This can be set in the program as shown below in the Socket Setup.
- It is also used to load a firmware image
General usage
- The MAC address on the two motors are set to to 70-B3-D5-96-E0-05 and 70-B3-D5-96-E0-06. If these are not read from the EEPROM they will need to be set in the program.
- There is a bootloader which is separate to the main code. If the code is set to execute from flashrom in IAR Embedded Workbench it will overwrite the bootloader.
- Development should be done using the RAM Debug option.
- Once development is complete it can be loaded as an image through the USB.
Connections
- 120V INPUT
- Broqwn → L
- Blue → N
- Green → Ground
- 24V OUTPUT
- White + Gray → -V
- Yellow + Orange → +V
Socket API
Socket Setup
There are 4 sockets available in firmware. In the supplied firmware Socket1 is used for direct communication to the motor. Socket2 is used for Modbus-TCP communication. They can be reassigned as needed.
...
The motor can be controlled to target positions by setting the following in the MotorControlStruct passed.
Variable | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MotionGenerator | Sets the motion control type. 0 - no motion type | |||||||||||||||||||||
Controlword | The control word is used as bits. Only B0 is used in Torque mode.
| |||||||||||||||||||||
TargetPos | Set the target position in a position control move. Example: TargetPos=1000 will set the target position to 1000 counts.
|
...
| |
TargetSpeed | Set the target speed in the resolution set. This is typically 1000 counts/revolution with a speed unit of 100counts/s. This will also set the maximum allowed speed in torque mode. Example TargetSpeed = 10 will set the target speed to 1000 as the default unit is 100counts/s. This will rotate the motor at 1 revolution/s. Max speed is 3000 rpm. I.e. TargetSpeed=500 is max value at default resolution (register K37)
|
---|---|
TargetAcc | Set the target acceleration in 1000 counts/s2. Example TargetAcc = 100 will set the target acceleration to 100000 counts/s2. |
TargetDec | Set the target deceleration in 1000 counts/s2. Example TargetAcc = 20 will set the target deceleration to 20000 counts/s2. |
TargetTorque | Set the target torque in 0.1% of rated torque. Example TargetTorque = 1250 will set the tarqet torque to 125% of rated which is peak torque. Range is ± 1250. Only torque mode uses a -ve torque. Setting a negative torque will run the motor CCW. |
Code Block | ||||
---|---|---|---|---|
| ||||
//First set the motion generator to 3.
MotionGenerator = 3
//Set all targets
TargetPos = 100000
TargetSpeed = 10
TargetTorque = 1250
TargetAcc = 10
TargetDec = 10
//set the controlword= 1 to start the motion
ControlWord = 1
//at any point change the speed, acceleration or position to change the profile
TargetPos = -10000 //run to absolute -10000
|