M
OTION
C
ONTROL
SMD23E2 and SMD24E2 User’s Manual
ADVANCED MICRO CONTROLS INC.
38
Assembled Move Programming
All of the segments in a Blend or Dwell Move must be written to the SMD23E2 or SMD24E2 before the
move can be run. Segment programming is controlled with two bits in the Network Output Data and two bits
in the Network Input Data. Blend and Dwell Moves are programmed in exactly the same way. When you start
the move, a bit in the command data determines which type of Assembled Move is run. In the case of a Blend
Move, the sign of each segment’s Target Position is ignored and all segments are run in the same direction. In
the case of a Dwell Move, the sign of each segment’s Target Position determines the direction of the segment.
For Dwell Moves, the Dwell Time is sent to the unit as part of the command.
Control Bits – Output Data
Program_Assembled bit –
A 0
1 transition on this bit tells the SMD23E2 or SMD24E2 that you want
to program a Blend or Dwell Move Profile. The unit will respond by setting the
In_Assembled_Mode
bit
in the Network Input Data. At the beginning of the programming cycle, the unit will also set the
Waiting_For_Assembled_Segment
bit to signify that it is ready for the first segment.
Read_Assembled_Data bit –
A 0
1 transition on this bit tells the SMD23E2 or SMD24E2 that the
data for the next segment is available in the remaining data words.
Control Bits – Input Data
In_Assembled_Mode bit –
The SMD23E2 or SMD24E2 sets this bit to tell you that it is ready to
accept segment programming data in the remaining output data words. The actual transfer of segment
data is controlled by the
Waiting_For_Assembled_Segment
and
Read_Assembled_Data
bits.
Waiting_For_Assembled_Segment bit –
A 0
1 transition on this bit from the SMD23E2 or
SMD24E2 is the signal to the host that the unit is ready to accept the data for the next segment.
Programming Routine
1) The host sets the
Program_Assembled
bit in the Network Output Data.
2) The SMD23E2 or SMD24E2 responds by setting both the
In_Assembled_Mode
and
Waiting_For_Assembled_Segment
bits in the Network Input Data.
3) When the host detects that the
Waiting_For_Assembled_Segment
bit is set, it writes the data for the
first segment in the Network Output Data and sets the
Read_Assembled_Data
bit.
4) The SMD23E2 or SMD24E2 checks the data, and when finished, resets the
Waiting_For_Assembled_Segment
bit. If an error is detected, it also sets the
Command_Error
bit.
5) When the host detects that the
Waiting_For_Assembled_Segment
bit is reset, it resets the
Read_Assembled_Data
bit.
6) The SMD23E2 or SMD24E2 detects that the
Read_Assembled_Data
bit is reset, and sets the
Waiting_For_Assembled_Segment
bit to signal that it is ready to accept data for the next segment.
7) Steps 3 to 6 are repeated for the remaining segments until the entire move profile has been entered.
The maximum number of segments per profile is sixteen.
8) After the last segment has been transferred, the host exits Assembled Move Programming Mode by
resetting the
Program_Assembled
bit.
9) The unit resets the
In_Assembled_Mode
and the
Waiting_For_Assembled_Segment
bits.
Saving an Assembled Move in Flash
The SMD23E2 and SMD24E2 also contains the
Save_Assembled_to_Flash
bit that allows you to store the
Assembled Move in flash memory. This allows you to run the Assembled Move right after power up, without
having to go through a programming sequence first. To use this bit, you follow the above programming routine
with the
Save_Assembled_to_Flash
bit set. When you reach step 9 in the sequence, the SMD23E2 or SMD24E2
responds by resetting the
In_Assembled_Mode
and
Transmit Blend Move Segments
bits as usual and then it will
flash the Status LED. If the LED is flashing green, the write to flash memory was successful. If it flashes red,
then there was an error in writing the data. In either case, power must be cycled to the SMD23E2 or SMD24E2
before you can continue. With a limit of 10,000 write cycles, the design decision that requires you to cycle power
to the unit was made to prevent an application from damaging the module by continuously writing to it.