Seccion 2
Seccion 2
Seccion 2
May 7, 2002
CANDELA CORPORATION
530 BOSTON POST ROAD
WAYLAND, MASSACHUSETTS 01778-1883
2.0 DEFINITIONS
The following are definitions of terms and acronyms used in this document:
3.0 REFERENCES
The following reference documents were used in the development of this specification:
The Laser control system consists of a CPU system controller, diode box, input/output PCB. The system controller portion of
the PCB contains an 68HC12 CPU and the firmware to operate the laser. The Laser Inputs and Outputs portion of the PCB
interfaces with the I/O ports of the CPU. In addition to the CPU, there is a four channel 12-bit A/D and a single channel 12-
Display
A,B,C Current FDBK
Data 8
(8-Bit Analog)
XY Drive
Touchscreen A,B,C Shunt Stat
2 XY Pos
RX Laser On/Off
Serial Port
Sbeam CPU
TX
68HC12
TEC ON/OFF
(8-Bit Analog)
DCD Valve
Head
Cryogen Detect SCLK Detector
A/D
DCD Press. CKT (8-Bit Analog) SD IN Converter
Cal Port
Pulse Sense Detector
The Touch Screen Display Panel is composed of a graphical electro-luminescent display with touch panel
overlay. The firmware provides a mixture of graphical icons and text to convey system setting, status, etc. to the
user. These icons allow interaction enabling the user to configure and operate the laser. The firmware monitors
the touch screen in order to obtain user input.
The firmware turns this lamp on whenever the system is in READY state.
The firmware uses an audible alarm to generate beep tones which alert the user that one of the following
conditions has occurred:
System Power Up (4 short beeps, also serves as diagnostic test)
Warm-up Complete (1 short beep)
Charging (1 short beep)
Pulsing (1 short beep)
Fault (1 long beep)
The Maintenance Terminal communication is via an RS-232 serial connection. The laser receives data at the
interrupt level. The data is moved to a holding buffer for later processing.
4.1.5 Footswitch
The user must depress the footswitch to fire a laser pulse. If the footswitch is held down, the laser will
continue to fire at a 1 Hz repetition rate (when Multi-pulse mode is selected).
§ All non-volatile variables will be stored in a partitioned segment of battery-backed RAM that can only be erased by
software. All variables stored in battery-backed RAM will be declared with the prefix “nv_” and will be defined in
nvram.c. All other variables residing in RAM not declared as non-volatile will be cleared at power on.
§ Icons have been used wherever possible to minimize language translation requirement with the firmware.
§ All text and graphic bitmap images displayed on the UI will be located in files suffixed “_dat.c”.
§ All other message bitmaps will be stored in the corresponding language file “[language].c”.
§ Exception: Language button bitmaps can be found in “lang_btn.c”
§ All initialization functions called for system initialization purposes will begin with the prefix “init_”
§ Any function that is called from interrupt level will be suffix preface terminated with the suffix “_int”.
The SmoothBeam can be operated in any of three system states: Standby, Ready, or Fault. Temperature and
pressure will be monitored periodically and controlled by background system processes. Some faults will be
INITIAL
ROM CheckSum
System Initialized Failure
CheckSum Pass
Non-Recoverable Fault
System Requires Service
Fault Cleared FAULT
Warmup State
Timeout
Warmup
Required
Calibration Not Required
& Trigger activated
Calibration Required
& trigger activated
Process = CAL Trigger Released
Additionally the following supporting routines are used. These are described in Section 7 and throughout the text:
1 Main Control Loop - Provides cyclical execution of system firmware.
2 RTI Interrupt Routine - Synchronizes to system timer to provide precise timing.
3 GUI Routines - Polls touch panel, displays text and graphics.
4 TEC Control Routine - Controls temperature of TE coolers.
5 DCD Control Routine - Controls DCD pressure.
6 Fault Check Routine - Checks for periodic faults.
7 Calibration Routine - Calibrates laser to set fluence.
8 Pulse Routine - Pulses the laser once, and dispenses set amount of cryogen.
9 Analysis Routine - Ensures that energy is within desired range.
10 Digital & Analog I/O Routines - Set and convert software value to tangible physical values
11 Maintenance Routine - Provides control of system hardware.
TEC is within 2
degrees of setpoint DCD reaches 107 p.s.i.
(if connected)
WARMUP STANDBY
Any STANDBY
fault
No pulsing
3 minutes
Redundant foot
switches pressed Triggered pressed Calibration
with cal required complete
Pulse
Complete
READY
There are 2 primary status flags used to monitor the status of the system. These flags are used by the processes to
allow process synchronization. The State and Process flags are updated at the entrance to each process.
The software uses 2 library routines known as Setjmp and Longjmp. These routines are used to simplify the exit
from the Fault Handler routine. The Setjmp gets executed at the beginning of the main control loop. This saves a
pointer into the current stack location. If a Fault occurs at any level of subroutines down in the system, the Fault is
processed and instead of returning to the original subroutine that had the fault, CPU processes Longjmps to the
start of the main loop. When the Longjmp occurs, it cleans up the stack to the way it was on the first entry. There is
no need to deal with the routines that caused the fault, and program control continues from the beginning of the
main control loop without stack growth problems.
5.6.2 Background
The background functions have priority of system operation unless otherwise specified by system code.
§ Real Time Interrupt service routine, rti_int(), is periodic with a 1ms rate. It updates the software timer
variables, reads the CPU’s digital inputs, and maintains the watchdog timer.
§ Serial port I/O service routine, serial_int(), supports the RS-232 communication between the laser
firmware and the diagnostic maintenance mode software.
§ The IRQ input to the HC12 allows an external device to cause a software interrupt. The IRQ service
routine, wrset_int(), sets a timer to synchronize CPU-Display data write transfers.
§ Cryogen valve detection interrupt routine, valve_check_int(), is a timer based interrupt which occurs
prior to cryogen valve closing. This interrupt checks the status of the cryogen valve circuit to determine
proper valve function.
§ Post pulse energy detection interrupt routine, post_pulse_int(), monitors the head detector unit after a sub
pulse has concluded to ensure laser emission has ended.
§ Output Timers 5,6 are used for output compare duty_set(). PortT of the HC12 allows Output Compare
functionality in conjunction with timer synchronization. This allows pins configured as output pins on
Port T to turn on and off according to the set values of internal timers. This concept is implemented to set
duty cycles for control of DCD and TEC heaters.
1) The Initialization procedure is only executed on system startup or reset. This procedure initializes interrupts,
sets all the hardware (outputs) to a known state, initializes the CPU on-chip peripherals (SPI, SCI,ADC), and
initializes the TSDP.
3) The audible alarm is sounded (4 short beeps) as a diagnostic test of the alarm. Ready lamp is also tested.
4) The firmware performs a ROM checksum test each time the laser is powered up. The checksum for the ROM
is calculated and compared against the checksum value stored in the ROM. If the checksum test fails, the
appropriate fault code is displayed and the firmware cycles in an endless loop.
5) A test for reasonable data values is made on the battery-backed RAM. The following tests are made:
§ If the software revision string variables matches
§ the non-volatile data is checked to ensure all values are within reasonable limits.
§ Values that are out of bounds are set to default values.
§ If not(I.E. a new version of software installed),
§ firmware copies the ROM software revision string into the RAM string
§ sets the selected non-volatile data to default values specified in ROM.
6) If BBRAM is cleared or TS parameters do not exist, the system will enter Touch Screen Calibration mode.
7) Next the display is updated with the upper and lower command bars as well as the main menu
The Warm-up Process executes a small state machine cycling through the states shown below in numerical order.
User input via the TSDP is disabled during this process.
1) BEGIN
§ The warm-up message box which contains a bar graph is displayed.
§ Initial percent completion value for the warm-up cycle is calculated and displayed.
§ Next the TE coolers and DCD heater are set to begin cooling/heating, and the warm-up state is set to
WARMING.
2) WARMING
§ Software calculates the progress of the warm-up based on the DCD systems.
§ The bar graph is updated based on whichever parameter has the longer warm-up time(is further from
setpoint).
§ The warmup state is changed to AT TEMP when:
§ TEC operating temperature is ±2 ºC of the set point is reached,
And
§ DCD pressure is greater than DCD warm-up temperature.
3) AT TEMP
§ Warm-up required flag is reset.
§ Warm-up state machine is set to DONE
§ System control is returned to the stand-by process of Stand-by state
§ Warm-up screen is cleared and a main menu is drawn.
While in the Ready process the firmware checks if the following conditions have been met to proceed to the
Activate process:
§ Ready State Timeout = false,
§ Repetition Rate Timer expired = true,
§ Active Trigger Switch = depressed,
§ Calibration Required = false,
§ If footswitch is depressed then go to the Cal process.
Activate Overview
The activation process encompasses enabling the laser, pulsing the laser, acquiring , and analyzing data obtained
from the laser when a valid trigger signal has been received. Control is returned to the Ready process when a valid
trigger signal is no longer detected. The activate process is comprised of a number of functions to perform these
tasks.
Pulse Overview
The pulse routine, fire_pulse(), is called only from the activate and calibration processes both accessible in the
ready state. The laser operator is required to depress the footswitch in order to pulse the laser.
The pulse of the Smoothbeam consists of four 52.5 ms sub-pulses for a combined 210 ms of laser on time. These
sub pulses will be interspersed with sprays of cryogen when:
§ The laser is not in ablation mode (DCD setting is greater than 0).
§ The hand piece is not in the cal port.
Throughout the pulse sequence, data is obtained from the energy detectors. The head detector is read on all laser
pulses. The cal port detector is only read upon detection of the hand piece in the cal port. Three readings are
taken during each sub pulse as shown in Figure 4. The first is taken after time T1 and the remainder are take after
the interval T2. Each reading consists of 3 samples of both the head detector and cal port detector (when
applicable).
The fourth sub pulse incorporates a current check. Feedback current from the three strings of the diode box are fed
into the A/D of the CPU. These values are used to determine proper laser operation.
T2
Pulse Analysis
After a successful pulse the data acquired during the pulse is compiled and analyzed regardless of process. This
data is used to determine if the laser is operating within system specifications. The following occurs when a pulse
is analyzed:
§ Generated and delivered energies are calculated using the average readings of all four sub-pulses from the
applicable detectors.
§ If the process is not calibration, a head detector energy check ensures energy is within ±10% of the
calculated head lock-in value.
§ If the hand piece is detected in the cal port, the transmission is checked.
§ Current data from the 3 strings obtained on the last sub-pulse of the pulse sequence is processed.
Calibration Overview
The calibration routine seeks to set the LPS current so that the laser delivers the desired energy selected by the
user within a tolerance range. The calibration is performed using the following concepts:
§ The laser must determine the energies it is capable of producing(delivered energy) and system responses
due to changes in current. (Diode Slope Calculation)
§ Once the system responses are known, the laser must attempt to output the desired energy. To do so, each
energy setting must have a baseline current from where it will attempt to achieve the proper output energy.
§ If the desired delivered energy can not be obtained with the initial input it will be necessary to adjust the
LPS using the known system responses.(Adjust Current)
§ Once the desired energy has been measured within range for 2 consecutive pulses, the current used to
obtain this energy is stored in a table. If the desired energy is not measured, the process is repeated.
2. Pressing the Calibrate Button: The calibrate button automatically puts the laser in the READY state and
sets the calibration required flag, before entering the calibration process.
4. Exiting Maintenance: A calibration will always be required when exiting from maintenance mode or
disconnecting from a maintenance terminal.
5. Hand piece Connector: When the system is not in the READY state and the HP connector is removed
one can assume that the delivery system has come off and a new delivery system has been attached.
6. Calibration Timeout: The rationale behind the calibration timeout is that the parameters which govern
system action can change if the system is not used within specified time. The calibration timer is set when
the system enters standby. If the timer expires while still in standby, the system will require a calibration.
7. Fault Conditions: A number of faults only occur when the output energy characteristics of a system
change. These changes require the system to re-calibrate. The following are a list of faults requiring a
recalibration.
§ Current Fault
§ Calibration Fault
§ TEC Fault
§ HP Fault
§ Energy Out of Range
§ Transmission
§ Post Pulse Energy Detection.
Calibration Initialization
The following steps will be taken to initiate the calibration process. If the hand piece is not inserted in the
CAL PORT when the calibration process is initiated, the operator will be instructed to place the HP in the CAL
PORT. A message displaying “INSERT HANDPIECE INTO CAL PORT” will appear.
When the hand piece has been inserted into the CAL PORT, the operator will be prompted to engage the
trigger to continue. A message displaying “DEPRESS FOOTSWITCH” will appear.
Once the trigger has been activated, the “CALIBRATING” message will be displayed.
Slope Calculation
The correlation between the output energy and input current for the diode lasers being used is fairly linear.
Therefore, the response of the laser over the entire range of operation can be categorized using two slopes. The
two slopes used correspond to the lower and upper portions of the current range and are later utilized to adjust
laser current.
Window Calculation
A calibration is deemed successful when the laser is able to achieve energies within a specific energy range.
The bounds of this window are defined by ±2.5% of the desired energy set on the front panel of the device.
Calibration Process
The calibration process is quite simple. A table exists with currents corresponding to each available output
energy of the laser. Given a calibration has not occurred at a particular energy, a default current value is placed in
the table. When a calibration is initiated the LPS is set to this value.
A calibration attempt consists of two calibration pulses. If the desired energy cannot be achieved within these
two pulses, the software will seek to adjust the current using the last energy obtained. The following equation,
Equation 1, is used to make the adjustment:
(desired energy - last acquired energy)
current adjustment =
calibration slope
Equation 1 – Calibration Current Adjustment
A regular calibration will consist of 3 calibration attempts and 2 current adjustments. If the desired energy
cannot be achieved, the slope will be calculated again and the laser will begin a second iteration of the regular
A successful calibration occurs when the cal port detects two pulses with energies falling inside of the
window. When a successful calibration occurs, a head lock-in value is calculated. All subsequent pulses are
measured against this value to ensure the energy generated by the laser stays within a ±10% range at the head
detector. The head lock-in value is calculated using the mean of the 2 head detector values where the laser
calibrates.
desired fluence
head lock - in = * averaged head (@calibration)
deliveredfluence(calibrated)
Equation 2 – Calibration Head Lock-in value
The Fault Process handles all fault and warning conditions. Warnings are considered problems that occur due to
system errors/malfunctions that can be easily corrected by the operator. Faults indicate system operating outside of
acceptable parameters due to system misuse or malfunction. Persistent faulting will likely require a service call to
correct.
When a fault or warning is detected, the fault process will revert the laser to the Standby State and display the
corresponding message window on the TSDP. The REPLACE CANISTER and the PURGE REQUIRED warning
conditions are displayed with unique message screens. The REPLACE CANISTER message screen includes an OK
command button. Depressing this button clears the fault and removes the message screen. The PURGE REQUIRED
message screen includes a PURGE command button. Depressing this button discharges cryogen from the DCD canister
in order to clear vapor bubbles in the cryogen line. This screen will clear when the bubble is no longer detected.
Faults are displayed with separate message windows displaying the numeric fault code and an OK command
button. If more than one fault exists, the firmware will continuously cycles through each fault and flashes the
corresponding numeric fault code within the fault message window. Depressing the OK command button will clear the
fault(s).
Fault will registered in all cases but no action will be taken when in maintenance mode. When in maintenance
mode, the ignore faults flag disables fault handling. In this case no action is taken by the fault handler and program
control is returned to the point when the fault was detected.
There are three tables that are used in the fault process to log fault occurrences, determine processed faults, and
determine which process must occur after fault is cleared.
§ The Fault Attributes table contains attributes associated with that fault or warning indicating the required system
actions for particular faults. The attributes are warm-up required, and calibration required.
§ The Fault Status table contains flags indicating a fault has been processed. The cyclic operation of the main
control loop results in repeated calls to the fault handler for certain faults. Once a fault has been processed the fault
handler will ignore subsequent occurrences of the same fault until that fault is cleared.
§ The Fault Log contains a event counter for each fault. When a fault is encountered the corresponding counter is
incremented. The counter stops incrementing when 255 event (faults) have been logged. The Fault Log is stored in
non-volatile RAM. The data will be available for inspection via the diagnostic port with a lap-top computer
running the Maintenance Mode Software.
The check_faults() routine periodically checks for a number of fault conditions. The remaining faults are
checked through out the various routines in the firmware. The point at which each fault is checked in the program
execution is given in Warning and Fault Descriptions below. Whenever a fault is detected in the firmware, the
Fault Handler is called.
The first time a fault is encountered, the fault_handler() routine generates a beep tone to alert the user. It then
sets the fault status flag in the fault_status[ ] table to indicate that the fault has been acknowledged/processed. Next
the fault counter in the nv_fault_log[ ] table is incremented to record the occurrence of the corresponding fault
(max. Count = 255 per fault). Then the fault attributes in the fault_attributes[] table are checked, and the
corresponding system actions are taken (I.E. turn off DCD heater, set cal_required flag, etc.). The system is then
placed in the Standby state, and the fault message box displayed. Finally, the system state is set to Fault, and
program control is returned to the beginning of the main process loop using a longjump operation.
Once a fault has been processed the fault handler will ignore subsequent occurrences of the same fault. Program
control is returned to the calling routine only for faults that have already been processed.
The REPLACE CANISTER and the PURGE REQUIRED warning messages are treated as special cases. None of
the fault tables are used. The beep tone is generated and the unique message boxes are displayed. Program control
is returned to the beginning of the main process loop using a longjump operation.
REPLACE CANISTER: A replace canister warning will appear when a systems DCD remaining count has
reached 0. Until the can is replaced and the DCD count is refreshed, the replace canister warning will appear
once every 60 seconds.
PURGE REQUIRED: When the DCD is enabled and bubbles are detected in any of the cryogen pulses, a purge
required message will occur. The system will require purging of the cryogen line until bubbles are no longer
detected. Once bubbles are no longer detected while purging, the system will continue.
FAULT 2 (ROM Checksum): Occurs after system power up, when the ROM checksum calculated by the
firmware does not equal the checksum value programmed into the ROM. When this condition occurs, the
software displays the error and denies use of the laser.
FAULT 3 (Shunt Fault): The Smoothbeam implements an electronic laser interlock, the shunt, which must be
enabled in order for the laser to operate. The shunts are checked when the laser is enabled to ensure they have
changed state, during the pulse routine to ensure they are “open”, and periodically in the main loop when not
lasing to ensure they are “closed”. A shunt fault occurs when any of the three shunt status lines returning to the
CPU are in the incorrect state during one of these checks.
FAULT 4 (Current Fault): The current applied to the three diode strings is fed back into three of the onboard A/D
channels of the CPU. This current is measured on the fourth sub-pulse of each pulse sequence and the values
obtained are processed and validated in the pulse analysis portion of the Activate Process. When any of the three
measured currents deviate from the set current by more than ±30%, a current fault is flagged.
FAULT 6 (Calibration Fault) If during the calibration procedure, the laser necessitated more than 2 slope
calculations to calibrate a calibration fault will be flagged. Or if the head lock in value calculated at the
conclusion of a calibration is greater than the Maximum Head Fluence (6.08J), a fault will be flagged.
FAULT 8 (DCD Over/Under Pressure Fault): This fault occurs when the DCD system pressure is outside of
normal operating conditions. When the pressure is above 125 psi, the DCD heater duty cycle is set to 0. When
the pressure is below 105 psi and the laser is in ready, an under pressure fault will occur. When either fault
occurs, the system will return to warm-up process and will not exit until the system reaches normal operating
conditions.
FAULT 9 (DCD Warm-up Timeout): DCD is required for all warm-ups. A fault occurs when the system is
warming up and does not reach the required DCD operating pressure at the end of the 45 minute time period. The
DCD duty cycle is set to 0.
FAULT 10 (Hand piece Fault): The system has the ability to determine if either of two hand piece configurations
are valid. The system also has the ability to determine if a valid system is connected at all. If a hand piece is not
recognized when the laser is in the READY state the system will fault.
FAULT 12 (Energy Out of Range): This fault occurs when the system has just fired a pulse in the Ready State and
the active process is READY and the measured Head energy is +-10% from the Head Lock-in value.
FAULT 13 (Trigger switch Fault): While in the Ready state, the firmware will continuously check for the two
trigger switches to be in the same state. This check is performed to ensure trigger switch redundancy. If the
triggers are not in the same state for 25 iterations of the check a fault will occur.
FAULT 15 (Transmission Fault): A transmission fault occurs when the calculated transmission falls below 65%
or exceeds 120% anytime the handpiece is in the CAL Port.
FAULT 16 (Cryogen Delivery Fault): The cryogen verification circuit is a hardware feedback input to the CPU
that is used to determine if the cryogen has been driven correctly allowing the cryogen valve to open. If the
circuit is not driven correctly when this input is checked this fault will be flagged.
FAULT 17 (Pulse Fault): Previously mention in section 6.6, a fourth reading is performed on all sub pulses to
ensure the laser emission has terminated at the end of each sub pulse in a pulse sequence. When an unacceptable
energy reading is detected at the conclusion of a sub-pulse, the pulse fault is flagged.
The Main Control Loop executes a number of periodic routines and delegates control to the selected state.
The firmware utilizes the CPU’s non-maskable COP watchdog reset as well as maskable interrupts: Real Time
Interrupt, SCI 1 (Serial Communication Interface #1), IRQ interrupt, and the interrupts on timer channels 1 and 2.
Highest priority is given to the Real Time Interrupt, all other interrupts follow in priorities assigned in Interrupt Vector
Map, Table 17 of the MC68HC12 technical summary p.49.
An internal flag is set when data is shifted into the serial buffer. Data in the buffer is read into RAM at this time.
Initialization of the devices baud rate ensures both data received and data transmitted will occur at the designated
baud rate to limit software overhead.
A LIFO, last in first out, input buffer (table), input_buf[], is maintained by the routine. It is updated in a every
10ms with the current state of the hardware inputs (digital) from the Laser I/O PCB. The input buffer is used by the
get_input() routine to determine the state of an individual input.
The COP Watchdog Timer is also maintained by this routine. The routine decrements the Foreground Timer
once a millisecond. The Foreground Timer is reinitialized at various points in the firmware during the execution of
the main control loop. Provided that the Foreground Timer has not expired (reached zero), the COP Watchdog
Timer is reset every 10ms by the routine and normal execution continues. In the event that the main control loop
running in the foreground should hang or stop operating correctly, the Real Time interrupt routine would allow the
COP Watchdog Timer to expire. This would result in a non-maskable CPU reset.
The LP data line of the SED 1335 generates a pulse when it is possible to write to the system without causing
any noise. This signal is inverted and fed in to the active low ~IRQ which is triggered on the falling edge of the
signal. Because this interrupt is maskable, it can be enabled when the CPU needs to update the display and
disabled when screen data is not being updated to avoid a high interrupt service density.
Before data is to be written to the display, the interrupt is enabled. Upon execution of the interrupt, a timer is
set with the amount of writable time for the CPU to write data to the display controller. While the timer has not
1
“Interfacing the EL320.240.63 with the SED1335 Controller: Application Note 121-01”, p. 8, Planar System, Inc., 1998
The following three Equation 3 - Equation 5 are required to calculate the amount of writtable time.
FOSC
− 1
F *[ L / F]
[ TC / R] = Refresh
9
Equation 3 – Display Line Length Calculation
[ TC / R] * 9 + 1
Time Required to display line =
f OSC
Equation 4 – Line Display Time
[ C / R] * 9 + 1
Time required to display data =
f OSC
Equation 5 – Data Display Time
For a complete list of write times for various refresh rate frequencies please refer to Appendix A.
Timer Calculation
The timer calculation = (known period of Timer 7, TS) * TEC duty cycle.
Timer Calculation
The timer calculation = (known period of Timer 7, TS) * DCD duty cycle.
The number of remaining DCD pulses is displayed on the main menu GUI is calculated using the deposition
rate and the known weight of a full can of cryogen.
DCDFullCan = Weight FullCan − Re serve _ Weight
-- Equation 6
925.0 g = 1000.0 g − 75.0 g
where the RESERVE_WEIGHT is the weight of liquid cryogen remaining in a canister that can no longer output
cryogen.
The A/D ports of the CPU, a four channel 12-bit A/D, and a single channel 12-bit D/A provide the necessary
hardware to measure and generate external analog signals. The 12-bit A/D and the 12-bit D/A devices interface with
the CPU via an SPI type serial interface. PORTAD of the CPU can be configured as an eight channel 8-bit A/D which
provides additional low resolution(8bit) analog inputs. The firmware routines used for the various types of I/O are
described below:
The digital input routine, get_input(), returns the value of individual hardware inputs (digital) from the Laser
I/O PCB. The routine “debounces” the input by performing a logical AND on the last three input samples from
input table, input_buf[]. This table is maintained by the Real Time Interrupt routine. Is updated in a circular
fashion every 10ms with the current input sample. Updating each input allows software to keep an updated record
of the input_status word used by the Maintenance Mode software to indicate the state the system inputs. The state
of each input monitored in maintenance mode is mapped to a bit of the input_status word.
The digital output routine, set_out(), sets the value of individual hardware outputs (digital) for the outputs of
the cpu. The routine also updates the output_status word used by the Maintenance Mode software to indicate the
state of the system outputs. The state of each output controlled in maintenance mode is mapped to a status bit
within the output_status word.
The 8-bit analog input routine, convert_8bit(), reads the value of individual inputs to the CPU’s analog
converter (Port AD). The desired channel is passed to the routine as an input parameter. The routine writes a
conversion command to the ATDCTL5 CPU register to start the conversion. It then polls on a conversion “done”
flag bit in the ADTSTAT CPU register. When the flag is set, the conversion data is read for the data register. The
routine returns the 8-bit data as an unsigned character data type to the calling routine.
The 12-bit A/D is used to acquire inputs from the head and cal port detectors. The 12-bit analog input routine,
take_reading(), reads the value of individual inputs of the 12-bit A/D. The desired channel is passed to the routine
as an input parameter. The routine writes a conversion command byte followed by two dummy bytes the SPDR
CPU register. The transmit “done” byte is polled after each byte write. When the flag is set, the SPODR register is
read. The lower 7 LSBs of conversion data are read from the SPODR after the first dummy byte. The upper 5
The 12-bit analog input routine, set_current(), sets the output current used to drive the diode strings. The
desired output current is passed to the routine as an input parameter. The firmware sets the Chip Select line for the
device low. The routine then writes a conversion command byte followed by two dummy bytes the SPDR CPU
register. The transmit “done” byte is polled after each byte write. When the flag is set, the SPODR register is read.
The data read is ignored. The Chip select line is set high and the output of the D/A changes to the new value. The
routine returns to the calling function.
The firmware will provide service access via an RS-232 serial port. The maintenance routine serves several purposes.
It can be used externally to control laser systems and set laser variables, monitor internal parameters, and it can also be
used for data acquisition purposes. Service personnel will communicate with the laser using a PC based computer and
proprietary software connected to the laser serial port. The firmware shall allow unabated access to key functions of
the laser for the purposes of troubleshooting and repair. This mode cannot be accessed by the user.
The user interface is used to view and change system operating parameters. The user interface consists of a
foreground menu, two sub-menus, message boxes, and a laser variable screen. The pre-defined characteristics of these
objects are stored in data structures within the software.
Foreground Menu
The foreground menu can be seen in Figure 5 split in two as Foreground Areas 1 and 2.
§ The foreground menu and its corresponding buttons are always present
§ The foreground menu can contain up to 6 buttons
§ Foreground displays system operating state in user-selected language.
Submenu
Available Submenus: Main menu, Option Menu, Laser Variable Menu
§ All submenus appear in the Submenu Area.
§ Sub-menus may contain up to 9 buttons
§ All Messages and bitmaps also appear in the Submenu Area.
§ Message boxes contain information and up to 3 buttons for the user to act upon.
§ Foreground menu buttons are not available during message display.
Submenu
Area
Buttons Decriptions
The button images used in the menus are composed of 3 graphic layers superimposed upon each others.
The 3 layers allows the GUI interface to produce various graphic effects. These effects provide visual
feedback to the user to simulate the actuation of a real button. Audible feedback is also utilized in the form of
a short chirping sound when a button is activated.
2) GROUP:
When a GROUP button is pressed it is redrawn to simulate a depressed button and the information within
the button face is inverted. Other buttons contained in the predefined group are drawn as released and not
inverted.
3) TOGGLE:
Toggle buttons allow the selection of one state of binary state variable used to control a laser function.
The buttons couple the logic state of the button with an ICON. When pressed, the state and ICON of the
button will change.
2) LONG:
Requires user to press and hold the button for a predetermined time before it will be activated.
3) AUTO-REPEAT:
Once the buttons function is activated it will be repeated at a predetermined repetition rate until the user
releases it.
4) EXTENDED:
The service_gui() routine controls all the primary periodic functions of the GUI including button scan and
detection, calling button redraw routines, updating and monitoring parameters displayed within the buttons,
and vectoring to functions associated with button presses.
7.7.2 TS Calibration
The TS Calibration routine allows the calibration of software parameters to increase the accuracy of the
mapping of the TS overlay with the display. The routine is entered automatically when the laser is powered on if
no TS calibration parameters exist in BBRAM or if the parameters stored in BBRAM are out of range. The
routine is also accessible from a button located on the laser variable menu.
The TS is calibrated and verified by a series of touches to the TS within specified regions designated by boxes
drawn on the display. The size and location of the calibration boxes and the tolerances of the verification boxes
are all pre-defined.
% displacement
(x+)
% displacement(y+) P2
P1
% displacement(y-)
% displacement
(x-)
Figure 6: TS Calibration
The calibration requires 2 touches in order to determine the calibration values to proceed with the
pixel_value calculation. The user will be instructed to touch the center of a box, with a small blunt-tipped
object. This box will then disappear and the user will be instructed to touch the center of another box
appearing in the opposite corner of the screen.
The position where the boxes will be displayed will be determined by a %displacement value for both the
x and y axes of the LCD. The %displacement is a percentage distance from the center of the screen in both the
x and y directions.
With the data acquired from the 2 points of the TS calibration, we can calculate the calibration values that
will be used later for determining all pixel_valuesxy
It is possible to calibrate the touch screen incorrectly, by not touching within the calibration boxes or a
faulty touch screen. In order to determine the correct values have been calculated a calibration verification
section has been created. Two verification boxes will be drawn following the completion of the ts_calibration
phase. The verification boxes will be drawn at predetermined positions on the screen. The following
conditions must be met in order for a calibration to be verified:
§ A touch of a verification box will be sampled X number of times.
In order for a verification to be successful, both verification boxes must be properly verified. If a touch
screen verification process cannot prove a touch screen calibration successful, default values will be loaded
and used to allow laser use.
The following describes Command Buttons displayed on the lower portion of the foreground menu.
The bottom foreground menu is removed and replaced by a message when the laser is pulsing. The laser
displays “LASING” as an additional indicator given the audible signal were to fail. When lasing ceases or a
fault is indicated, the standard foreground menu is updated.
Main Submenu
The following describes Command Buttons displayed on the main submenu.
BUTTON TYPE (GROUP#) BEHAVIOR
FLUENCE GROUP (1) NORMAL
DCD SPRAY GROUP (1) NORMAL
UP ARROW MOMENTARY AUTO-REPEAT
DOWN ARROW MOMENTARY AUTO-REPEAT
EXTENDED
PULSE COUNT MOMENTARY LONG
DCD CANISTER MOMENTARY LONG
Table 6: Main menu Buttons
FLUENCE - Allows the user to view/select the fluence value.
DCD Spray - Allows the user to view/select the spray duration value. Set duration to zero
to disable DCD.
UP ARROW - Allows the user to increment the selected parameter..
DOWN ARROW - Allows the user to decrement the selected parameter
DCD CANISTER - Allows the user to view/reset the Canister Count.
PULSE COUNT - Allows the user to view/reset the Pulse Count.
3) PULSE COUNT
The firmware displays the number of treatment laser pulses delivered. When the laser is turned on, the
value is reset to 0. The user can also manually reset this value at any time when the system is on by
pressing the command button.
4) CANISTER COUNT
The firmware displays the number of DCD pulses remaining in the canister. This value is calculated
based on the remaining canister volume and the present value of the SPRAY parameter. The firmware
stores the canister volume value in battery backed RAM. This value can also be reset to the maximum
canister value at any time. This action will initiate a warm-up.
Option Submenu
The following describes Command Buttons displayed on the Option submenu.
BUTTON TYPE (GROUP#) BEHAVIOR
PULSE MODE TOGGLE NORMAL
PURGE MOMENTARY LONG
LANGUAGE UP MOMERTARY REPEAT
LANGUAGE LABEL N.A. -----------
LANGUAGE DOWN MOMENTARY REPEAT
Table 8: Option Menu Buttons
Laser Revision
Set Fluence (J/cm2) LPS Current (A)
Last Head Detector Reading ( J ) Last Cal Detector Reading ( J ) Transmission ( % )
Diode Pulses
System Pulses
Table 10: Laser Variable Mode Display Output
Messages
All message buttons are MOMENTARY type with NORMAL behavior. These buttons appear when a message
replaces the displayed submenu. The buttons exist to clear a message or to verify acknowledgment of the message
displayed.
It is important to note that refresh rated below 45Hz will appear to be dim and may appear to flicker.
200.00
180.00
160.00
140.00
Writtable Time (us)
120.00
80.00
60.00
40.00
20.00
0.00
0 20 40 60 80 100 120
Refresh Rate (Hz)
TS
Timer 6 Event
TC7
1
Timer 5 Event
TC6
TC5
% Time
0% 50% 100%
The values TCx’s should be set to are determined by the percentage results generated by a separate calculation.
May 7, 2002
CANDELA CORPORATION
530 BOSTON POST ROAD
WAYLAND, MASSACHUSETTS 01778-1883
3.0 REFERENCES................................................................................................................................................................................... 3
The purpose of this document is to define the requirements of the Smoothbeam. The firmware for this laser will be designed to deliver
and calibrate the selected fluence settings, control system functions, and provide user interface functions. The firmware will be used
to control internal parameters to monitor and maintain proper operation characteristics.
2.0 DEFINITIONS
The following are definitions of terms and acronyms used in this document:
CDRH: Center for Devices and Radiological Health
DCD Dynamic Cooling Device
TEC: Thermoelectric Cooler
ROM: Read Only Memory
RAM: Random Access Memory
LPS: Laser Power Supply
UI: User Interface
3.0 REFERENCES
The following reference document was used in the development of this requirement:
• CANDELA Firmware Standard Operating Procedure
• Smoothbeam Engineering Design Specification
The Smoothbeam laser is a 1450nm diode based medical laser, controlled by an embedded processor for general
dermatological use. The system is comprised of a laser power supply LPS, laser diode box, associated optics, energy
detectors, a display with touch screen interface, and control electronics. The user interface UI consists of a control panel
located on the exterior of the laser. Allowing the selection of system operating parameters. These and other instruction sets
are processed and performed by the 68HC12 microprocessor.
The laser system utilizes Dynamic Cooling Device(DCD) to balance the effects of lasing. Short bursts of cryogen spray are
delivered in conjunction with the laser pulse to achieve this joint effect. The cryogen is delivered via a hose to a nozzle
located inside of the delivery system. The optical delivery system will focus a 4mm circular beam onto the skin via an optical
fiber.
The laser has the ability to calibrate the output energy of the delivery system to the fluence level selected by the operator.
Once the energy has been calibrated, the laser can deliver a single pulse burst or deliver continuous pulse bursts at rate of one
pulse per second. The pulse sequence consists of a fixed 210 ms laser on time interspersed with cryogen spray of variable
lengths, resulting in a laser/DCD pulse of 225 – 310 ms in duration. The output energy is controlled by the laser power
source and monitored by both the calport and head detectors.
§ Maintain a User Interface(UI) via a control panel located on the laser exterior. The UI will allow the operator to select
the user adjustable parameters of the system. The interface will also be used to convey faults, warnings, and system
status to the user (see section 5.3).
§ Control of DCD pressure and TEC temperature critical to system operation (see sections 5.4, 5.5).
§ Control and monitoring of system safety interlock components (see section 5.5).
§ Interface with a maintenance mode for service and in-house personnel that allows control of the laser components to
determine a system operating states (see section 5.6).
§ Handle all controllable conditions where the system is not operating within “normal” parameters.
4.3 CONSTRAINTS
§ The firmware prevents laser output while the trigger switch is not being depressed.
§ A hardware interlock prevents laser operation if the remote CDRH interlock is not inserted.
§ The firmware program shall be written in the C language, using assembly language only where absolutely necessary, to
allow for easier firmware maintenance.
§ The microprocessor is a Motorola MC68HC12 family component.
§ The firmware program will be compiled, assembled, and linked using Cosmic Software’s C Cross Compiler for Motorola
MC68HC12.
§ The firmware program will be programmed into an EPROM with a 256 Kbytes maximum amount of program memory
(ROM).
§ The ROM (supplies on a removable circuit board) will be programmed at CANDELA and installed by Candela or the
user.
§ The maximum amount of external memory (RAM) available shall be 32 Kbytes (non-volatile). This external memory
will be partitioned to hold non-volatile variables, temporary variables, and stack information in separated regions of
memory.
§ Battery backed system parameters and calibration data used by the firmware shall be stored in the non-volatile sector
of RAM.
§ A laser output pulse can be triggered only by depressing the trigger switch which will be a pneumatic footswitch.
§ Only one type of optical fiber will be available.
§ The operator will not use the system in an manner inconsistent with intended use and will comply with directions
displayed by the UI and the instruction manual.
• After system power on and initialization the laser will enter into a STANDBY state.
• A detailed state chart describing the interaction of the three states and state sub-processes is provided in figure1.
§ System control and monitoring will take place periodically regardless of system state.
INITIAL
ROM CheckSum
System Initialized Failure
CheckSum Pass
Non-Recoverable Fault
System Requires Service
Fault Cleared FAULT
Warmup State
Timeout
Warmup
Required
Calibration Not Required
& Trigger activated
Calibration Required
&Trigger activated
Process = CAL Trigger Released
When power to the system is turned on, the firmware shall execute the following:
§ System Power On Initialization
§ Power is applied to the system resetting all system hardware to a known non-lasing state via the firmware.
§ System Diagnostics:
§ Checksum verification of all ROM is performed. If the calculated value does not = value in memory, a fault will
be indicated.
§ RAM Validity Tests:
§ Check that the software version has not changed from previously stored value. This is used as an
indication that memory was corrupted or the firmware has been changed. If it has, all non-volatile data
except System Total Pulse count and the canister weight are cleared or set to a default value.
§ Check that critical variables are within bounds. If not, then set to save default values.
§ Check that TS value exist and are in range, if not cal TS calibration routine
§ Set initial system state to STANDBY
Standby Sub-processes
1. The firmware shall perform the following while the STANDBY process is executing:
§ Set calibration flag requiring calibration if either calibration timer has expired
§ Maintain system screen.
2. The firmware shall perform the following while the WARMUP process is executing:
§ The warm-up process is a mini-state machine which executes instructions sets dependant upon the warm-up
state.
§ The cryogen pressure will be periodically monitored. As pressure increases the warm-up status percentage bar
will increase accordingly.
§ Warm-up will complete when both TEC temperature and DCD Pressure have come within the proper range.
§ Upon completion of WARMUP the unit reverts to the STANDBY process.
Ready Sub-processes
1. The firmware shall perform the following while the CALIBRATION process is executing:
§ Initialize calibration variables and prompts the user to place the hand piece in the CAL PORT if not already
inserted. Followed by prompt to depress the footswitch.
2. The firmware shall perform the following while the ACTIVATE process is executing:
§ Laser shunts are opened:
§ Before each pulse in Single Pulse Mode.
§ Before a pulse sequence in Multi-Pulse Mode.
§ If trigger is still activated, the lasing/DCD sequence begins, otherwise the pulsed flag will not be set.
§ Enables laser emission for a set time period and verifies that emission has ended when the time period expires.
§ Deliver pulses at a rate of up to 1Hz when the trigger switch is continuously depressed.
§ Update system and treatment counters as necessary.
PURGE REQUIRED There are bubbles in the cryogen tubing. This usually occurs when a canister is empty or
when a new canister has been installed. Press the PURGE command button to clear
bubbles.
F3 SHUNT FAULT
Shunt Status hardware indicates shunts are not in correct state.
F4 CURRENT FAULT
Diode current not within 30% of set current during laser pulsing.
F6 CALIBRATION FAULT Occurs when laser cannot achieve energy after 2 full calibration attempts. Or
head detector lock-in values is greater than 6.08 J.
F7 TEC TEMPATURE OUT OF RANGE If TEC temperature is less than minimum value or greater than maximum value
while in ready.
F9 DCD WARMUP TIMEOUT DCD fails to come out of warm-up in given time period DCD warm-up time
period.
F10 HP FAULT Hand piece is not connected. Fault indicates malfunction of hand piece circuitry
or cabling.
F12 ENERGY OUT OF RANGE Head energy is not within +-10% of set calibration energy. Energy measured
when treating.
F17 POST-PULSE ENERGY FAULT The HD detector measured > 50% of the expected Head Energy after the pulse
was completed. It should be 0.