~QlarityLib~ 0xFFFF Do not edit this file. Doing so will almost certainly destroy its integrity! Galil_mc @6077950 7947776 2 1.500000 0 N1.5 *2073 39218 1.52 0 sGalilCommunications %GalilCommunication%FFFFF00FC0038FF13FFD7C7F391F9C47CFF3E007F84FFF9FFF3FFE7FFFFF *41291 33704 1.52 0 pGalilCommunications *74995 13477 1.52 0 1GalilCommunications *88472 14233 1.52 0 sGMCPoll %GMCPoll%80013FFC40025FFA58FA577A577A577A587A5FBA5FDA5FFA40023FFC8001 *102705 9359 1.52 0 pGMCPoll *112064 6590 1.52 0 1GMCPoll *118654 25518 1.52 1 sGMCCommand %GMCCommandDisplay%80013FFC40025EFA5F7A403A5F7A5E7A5EFA5C025EFA5F7A40023FFC8001 %GMCCommandExec%FFFFFFFFFFFFFF7FFFBFE01FFFBFFE7FFDFFF807FDFFFEFFFFFFFFFFFFFF *144172 16349 1.52 1 pGMCCommand *160521 11830 1.52 1 1GMCCommand *172351 39092 1.52 0 sGMCGauge %GMCGauge%FFF0FE16FFF6FF96FFF6FF96FFF6FE16FFF0FF90FFF0FF90FFF0FE10FFF0 *211443 36305 1.52 0 pGMCGauge *247748 9402 1.52 0 1GMCGauge *257150 26904 1.52 0 sGMCPathTrace %GMCPathTrace%3FFF73E76DDB6C1B31C77BEF77F777F737F77BEF7DDF7E3F3FFF6EEE0000 *284054 22477 1.52 0 pGMCPathTrace *306531 11174 1.52 0 1GMCPathTrace *317705 14136 1.52 0 sGMCAutoScale %GMCAutoScale%F3BF1D5F7B5F71BF3FFF7FFF7FFF1FFF7FFF7FFF3FFF7DBF795F1D5FFDBF *331841 16179 1.52 0 pGMCAutoScale *348020 2695 1.52 0 1GMCAutoScale *350715 28883 1.52 1 sGMCSimpleTerminal %GMCSimpleTerminal%00007FEE7FEE7FEE00007FFE7FFE7FFE7FFE7FFE7FFE7FFE7FFE7FFE0000 *379598 31614 1.52 1 pGMCSimpleTerminal *411212 6904 1.52 1 1GMCSimpleTerminal *418116 21314 1.52 0 sGMCTrendChart %GMCTrendChart%00007FFE71FE6EFE5F7E5F7E3FBE2AAA7FBE7FDE7FDE7FEC7FF27FFE0000 *439430 21716 1.52 0 pGMCTrendChart *461146 8555 1.52 0 1GMCTrendChart *469701 8256 0.00 0 sGMCStringAlloc *477957 8400 0.00 0 pGMCStringAlloc *486357 2522 0.00 0 1GMCStringAlloc *488879 13186 1.01 0 sGMCDownload %GMCDownload%00007FFE46FE5AFE5AFE5AFE5AFE463E7FFE7FDE6FEE54066FEE7FDE0000 *502065 8529 1.01 0 pGMCDownload *510594 6862 1.01 0 1GMCDownload *0 0 ZZ #ifnot Galil_mc_src_GalilCommunications #option Galil_mc_src_GalilCommunications enum GMC_DataType as GMC_Position:=100, GMC_PositionError:=101, GMC_CommandedPosition:=102, -> GMC_LatchedPosition:=103, GMC_DualEncoderPosition:=104, GMC_Torque:=105, GMC_Switches:=106, -> GMC_AnalogInput1:=1, GMC_AnalogInput2:=2, GMC_AnalogInput3:=3, GMC_AnalogInput4:=4, -> GMC_AnalogInput5:=5, GMC_AnalogInput6:=6, GMC_AnalogInput7:=7, GMC_AnalogInput8:=8 enum GMC_Axis as GMC_Axis_X := 'X', GMC_Axis_Y := 'Y', GMC_Axis_Z := 'Z', GMC_Axis_W := 'W', -> GMC_Axis_E := 'E', GMC_Axis_F := 'F', GMC_Axis_G := 'G', GMC_Axis_H := 'H' enum GMC_BevelStyle as GMC_BevelRaised, GMC_BevelSunken, GMC_BevelNone enum GMC_SerialFormat as GMC_19200_RTS_CTS:=0, GMC_9600_RTS_CTS:=1, GMC_1200_RTS_CTS:=2, GMC_19200_NOFLOW := 3, GMC_9600_NOFLOW := 4, GMC_1200_NOFLOW := 5 #option GMC_EXTENDEDCOMMODES enum GMC_EnetStates as GMC_Serial := 1, GMC_Pending := 2, GMC_Enet := 3, GMC_Invalid := 4 enum GMC_CommMethod as GMC_UseSerial:=0, GMC_EthernetUDP:=1, GMC_EthernetTCP:=2, GMC_None:=3 enum GMC_DispErrors as GMC_DisplayNone, GMC_DisplayCommErrors, GMC_DisplayAllErrors enum GMC_FailureReason as GMC_FailCommunications, GMC_FailBadCommand, GMC_FailUnexpectedData const GMC_MaxStream := 256 const GMC_MaxPendingStreams := 256 const GMC_MaxTxLen := 80 const GMC_SpecialTerm := "MG\"~@~\"\r" const GMC_TermStr := "~@~" const GMC_VisTimeout := 6 const message GMC_CommSuccess const message GMC_CommFailure const message GMC_SuspendSuccessNotify const message GMC_SuspendCommReceive #hidden dim GMC_CommObjPos as integer #hidden dim GMC_CommObjHeight as integer dim GMC_DefaultCommObj as objref GalilCommunication #undoc func GMC_SetCommObjPos func GMC_SetCommObjPos (obj as objref) dim mu, md, ml, mr, nlx, nly as integer if GMC_CommObjHeight == 0 then GetBDFFontMetrics (ml, mr, mu, md, nlx, nly, default, font_normal) GMC_CommObjHeight = mu+md endif Relocate (obj, 0, GMC_CommObjPos * GMC_CommObjHeight) GMC_CommObjPos := GMC_CommObjPos + 1 endfunc #undoc func GMC_VerifyCommObj func GMC_VerifyCommObj (commObject as reference to objref GalilCommunication) if commObject == empty then commObject := GMC_defaultCommObj #if _tool tool_persist(commObject) #endif endif endfunc #hidden dim GMC_CurLocalPort as integer #undoc func GMC_GetLocalPort func GMC_GetLocalPort() returns unibyte if GMC_CurLocalPort == 0 then SeedRandomNum() GMC_CurLocalPort := 10000 + integer(40000*GetRandomNum()) else GMC_CurLocalPort := ((GMC_CurLocalPort - 9999) mod 40000) + 10000 endif return GMC_CurLocalPort endfunc #undoc func GMC_CountCommands func GMC_CountCommands(stream[] as byte) returns integer dim posS, posN as unibyte 'Using unibyte because -1 translates as 65535 dim oldPos as unibyte dim count as integer 'Quoted strings don't allow semicolons or quotes in them 'Which makes our life easy posS := find (stream, oldPos, -1, ";") posN := find (stream, oldPos, -1, "\n") 'if both are equal we have the end of our loop while (posS <> posN) do if (posS < posN) then count := count + 1 oldPos := posS+1 posS := find(stream, oldPos, -1, ";") else count := count + 1 oldPos := posN+1 posN := find(stream, oldPos, -1, "\n") endif loop 'Is stream terminated? oldPos := len(stream) - 1 if oldPos < 32000 then 'Only count semicolon as final terminator as a semicolon is auto appended if stream 'doesn't end in one. If the final character of the stream is a newline, then 'an extra null command will be appended, but won't be harmful if (stream[oldPos] <> ';') then count := count + 1 endif endif return count endfunc #undoc func GMCDataTypeToCommand func GMCDataTypeToCommand(dt as GMC_DataType, axis as GMC_Axis, useCustom as boolean, -> custom as string) returns string dim tmpStr[1] as byte dim tmpInt as integer tmpStr[0] := axis if useCustom then 'Verify 1 command only tmpInt = GMC_CountCommands(custom) if tmpInt < 1 then return "TPX;" 'Make up an arbitrary command elseif tmpInt == 1 then return custom else 'Shrink down to 1 command tmpInt = find(custom, 0, -1, ";") custom = left(custom, tmpInt) tmpInt = find(custom, 0, -1, "\n") custom = left(custom, tmpInt) return custom + ";" endif elseif dt <= GMC_AnalogInput8 then return "MG@AN[" + str(dt) + "];" elseif dt == GMC_Position then return "TP" + tmpStr + ";" elseif dt == GMC_PositionError then return "TE" + tmpStr + ";" elseif dt == GMC_CommandedPosition then return "RP" + tmpStr + ";" elseif dt == GMC_LatchedPosition then return "RL" + tmpStr + ";" elseif dt == GMC_DualEncoderPosition then return "DE?;" elseif dt == GMC_Torque then return "TT" + tmpStr + ";" elseif dt == GMC_Switches then return "TS" + tmpStr + ";" else return "" endif endfunc #undoc func GMC_ClearException func GMC_ClearException() dim errTyp, errLev as unibyte dim errStr[] as byte GetException(errStr, errTyp, errLev) endfunc Define Area Object type GalilCommunication #ToolImage "FFFFF00FC0038FF13FFD7C7F391F9C47CFF3E007F84FFF9FFF3FFE7FFFFF" '******************************************************************* 'Object: GalilCommunication 'Author: Jeremy Richards 'Date: 27 May 2004 ' 'Description: Galil motion controller communications object ' 'Version: 1.52 'Copyright 2004 QSI Corporation 'Permission is granted to copy, distribute and modify this code, 'provided that this copyright statement is preserved '******************************************************************* #doc object GalilCommunication ~This object forms the core of the Galil library. This object controls ~all interaction between the motion controller and the QTERM-G70. It is ~capable of communicating with a motion controller either serially or via ~ethernet. To communicate with a motion controller, create an instance of ~this object and set up its properties as appropriate. Then create other ~GMC objects and set thier commObject property to refer to this object. ~You can communicate with multiple motion controllers by creating one ~GalilCommunication object per controller. There is a limit of one controller ~per serial port on the G70 and a limit of 8 ethernet controllers that can be ~used at once. Library Standard Source TextSingleLineBDF Library Standard Source IPSupport library standard source formatfunctions #doc prop CommMethod ~The value of this property determines how this object will attempt communication ~with the controller. You can select between Serial, TCP/IP, UDP/IP or no ~communication. If you attempt to change communication methods while this object is ~attempting to open an ethernet channel to the controller, an error is generated and ~no change in communication is made. In general, you should set this property ~when designing your workspace and not change it at runtime on the terminal. dim CommMethod as GMC_CommMethod init CommMethod := GMC_EthernetUDP func CommMethod (newVal as GMC_CommMethod) if (newVal == GMC_EthernetUDP) or (newVal == GMC_EthernetTCP) then 'Attempting to switch to ethernet if (enetState == GMC_Pending) then 'Pending and attempting to switch between TCP & UDP? if newVal <> CommMethod then 'Attempting a swtich throw (str(me), "Unable to switch between UDP and TCP when an ethernet connection is pending") else CommMethod := newVal return 'No change endif elseif (enetState == GMC_Enet) then 'Have a current ethernet connection. Switching between TCP & UDP? if newVal <> CommMethod then 'Attempting swtich between TCP & UDP CommMethod := newVal CloseEthernet() OpenEthernet() else CommMethod := newVal return 'No change endif elseif (enetState == GMC_Serial) then CommMethod := newVal CloseSerial() OpenEthernet() else CommMethod := newVal OpenEthernet() endif elseif (newVal == GMC_UseSerial) then 'Attempting to switch to serial if (enetState == GMC_Serial) then CommMethod := newVal return 'No change elseif (enetState == GMC_Pending) then throw (str(me), "Unable to switch to serial communications while ethernet connecting is pending") elseif (enetState == GMC_Enet) then CommMethod := newVal CloseEthernet() OpenSerial() elseif enetState == GMC_Invalid then CommMethod := newVal OpenSerial() endif elseif (newVal == GMC_None) then 'Attempting to quit communications if (enetState == GMC_Serial) then CommMethod := newVal CloseSerial() elseif (enetState == GMC_Pending) then throw(str(me), "Unable to switch to no communication while ethernet connecting is pending") elseif (enetState == GMC_Enet) then CommMethod := newVal CloseEthernet() elseif (enetState == GMC_Invalid) then CommMethod := newVal endif endif endfunc #doc prop IPAddress ~This property defines the IP address of the motion controller. If communicating via ethernet ~set this property to be the IP address of the motion controller. Use the industry standard ~dotted string format (i.e. "192.168.1.1") to specify the address. This property is ignored if ~CommMethod is not set to either GMC_EthernetUDP or GMC_EthernetTCP. dim IPAddress as string init IPAddress := "192.168.1.1" func IPAddress (newVal as string) IPAddress := newVal if (enetState == GMC_SERIAL) or (enetState == GMC_Invalid) then return elseif (enetState == GMC_Pending) then throw (Str(me), "Unable to change IP address while ethernet connection is pending") else CloseEthernet() OpenEthernet() endif endfunc #doc prop serialPort ~This property determines which serial port on the QTERM-G70 is used for communication with ~the motion controller. Set it to the G70 serial port to which the controller is attached. ~This property is ignored if CommMethod is anything except GMC_UseSerial. dim SerialPort as comm init SerialPort := com1 func SerialPort (newVal as comm) if enetState == GMC_Serial then CloseSerial() SerialPort := newVal OpenSerial() else SerialPort := newVal endif endfunc #doc prop serialFormat ~This property determines the serial format that is used for communication with the motion ~controller. Select the format that the motion controller is using to ensure proper communcation. ~This property is ignored if UseEthernet is anything except GMC_UseSerial. dim SerialFormat as GMC_SerialFormat init SerialFormat := GMC_19200_RTS_CTS func SerialFormat (newVal as GMC_SerialFormat) SerialFormat := newVAl if enetState == GMC_Serial then VerifyCurPortSettings() endif endfunc #doc prop maxRetries ~If the motion controller fails to respond to a command, the communications object can attempt ~to retry the command. Generally the motion controller will only fail to respond if it ~is extremely busy or there is a communications problem. As many commands tell the controller ~to perform some action and can cause problems if they are resent, the default number of retries ~is zero. You may increase the number of retries if your application only uses query commands. ~

Note: This property only applies if you are using GMC_UseSerial or GMC_EthernetUDP ~as your communication method. This property is ignored for TCP communication as the ~TCP/IP protocol automatically retries. dim MaxRetries as integer init maxRetries := 0 #doc prop timeout ~timeout defines how long (in milliseconds) this object will wait for a response from ~the controller before it decides that there has been a communications failure. If the ~timeout elapses without receiving a response from the terminal, then the data is considered ~lost and is retried if maxRetries is non-zero. ~

Note: This property only applies if you are using GMC_UseSerial or GMC_EthernetUDP ~as you communication method. This property is ignored for TCP communication as the ~TCP/IP protocol automatically deals with timeout issues. dim timeout as integer init timeout := 3000 func timeout (newVal as integer) timeout := newVal timeoutCounts := newVal / 500 '# of half second ticks endfunc #doc prop displayErrors ~This property determines how, if at all, errors are displayed when they occur. Errors are ~displayed in a small yellow bar near the top of the display. The ~following options are available:

~
GMC_DisplayNone
No errors are displayed. This object will never display an error ~message. ~
GMC_DisplayCommErrors
Errors in communication are displayed. This includes ~communication timeouts and unexpected TCP disconnections. ~
GMC_DisplayAllErrors
All errors are displayed. This includes all communication ~errors as well as errors returned by the controller in response to bad commands.
dim displayErrors as GMC_DispErrors init displayErrors := GMC_DisplayCommErrors #doc prop unsolicitedAware ~This property determines whether this object will watch for unsolicited messages from the ~controller. If this value is true, then all data returned from the controller is examined ~for unsolicited messages (i.e. data returned from the controller that was not requested by ~this terminal. Examples include "MG" commands in the program executing on the controller). ~When unsolicited messages are detected, the UnsolicitedMessageReceived event is ~generated. You can handle this event to examine incomming unsolicited messages.

~If this property is false, then this object does not watch for unsolicited messages. Setting ~this property to false will generally lead to improved performance on the terminal, however, ~if an unsolicited message is sent, then a communications error will occur. Set this property ~to false if you want better performance on the terminal and know that the controller will not ~send unsolicited messages. dim unsolicitedAware as boolean init unsolicitedAware := true func Startup() handles msg_init Enable(me, true) Attach(me, default) CommMethod(CommMethod) RegisterMsghandler (me, MSG_TIMETICK, 25) 'Timeout ticks every 1/2 second GMC_SetCommObjPos(me) timeout(timeout) if GMC_DefaultCommObj == empty then GMC_DefaultCommObj := me #if _Tool Tool_Persist (GMC_DefaultCommObj) #endif endif endfunc private dim enetState as GMC_EnetStates init enetState := GMC_Invalid private func enetState (newVal as GMC_EnetStates) enetState := newVal endfunc private dim thePort as comm private func OpenEthernet() dim IPAddr[] as byte dim netMethod as netprotocol if commMethod == GMC_EthernetTCP then netMethod := NET_TCP else netMethod := NET_UDP endif #if _tool_any if enetState <> GMC_Invalid then tool_Trace (str(me) + " Invalid state when opening ethernet") endif #endif if _ParseIPAddressString (IPAddress, IPAddr) then NetOpen (me, NetMethod, GMC_GetLocalPort(), 51987, IPAddr) enetState = GMC_Pending else enetState = GMC_Invalid comBuf := "" throw (str(me), "Invalid IP Address: " + IPAddress) endif endfunc private func CloseEthernet() if enetState == GMC_Enet then 'Enet is currently open UnregisterMsgHandler (me, MSG_COMM_RECEIVE, thePort) NetClose (thePort) endif enetState = GMC_Invalid comBuf := "" endfunc private func CommAccept (socket as comm) handles MSG_COMM_ACCEPT if enetState <> GMC_Pending then NetClose (socket) 'This should never execute #if _tool_any tool_trace (str(me) + "Invalid state when NetAccept received") #endif endif 'Unregister whatever we might have been listening to UnregisterMsgHandler (me, MSG_COMM_RECEIVE, thePort) thePort := socket RegisterMsgHandler (me, MSG_COMM_RECEIVE, thePort) enetState = GMC_Enet 'Turn echo off. Set the unsolicited bits high SendAsciiCommandStream ("CW1;EO0;", me, 0) endfunc private func CommError (errcode as integer, errmsg[] as byte) handles MSG_COMM_ERROR MakeVisible ("Ethernet error: " + errMsg) if (thePort > COM10) or (thePort < COM1) then NetClose(thePort) endif UnregisterMsgHandler(me, MSG_COMM_RECEIVE, thePort) enetState = GMC_INVALID comBuf := "" CommMethod = GMC_NONE endfunc private func OpenSerial() #if _tool_any if enetState <> GMC_Invalid then tool_Trace (str(me) + "Invalid state when opening port") endif #endif thePort := SerialPort RegisterMsgHandler (me, MSG_COMM_RECEIVE, SerialPort) VerifyCurPortSettings() enetState = GMC_Serial 'Turn echo off. Set the unsolicited bits high SendAsciiCommandStream("TC;CW1;EO0;", me, 0) 'TC is a spurious command to deal with the bad 'char that is transmitted upon bootup endfunc private func CloseSerial() UnregisterMsgHandler (me, MSG_COMM_RECEIVE, SerialPort) enetState = GMC_Invalid comBuf := "" endfunc private func VerifyCurPortSettings () dim baud as syscmd_baud dim flow as syscmd_flowcontrol if SerialFormat == GMC_19200_RTS_CTS then baud := baud_19200 flow := flowcontrol_rts_cts elseif SerialFormat == GMC_9600_RTS_CTS then baud := baud_9600 flow := flowcontrol_rts_cts elseif SerialFormat == GMC_1200_RTS_CTS then baud := baud_1200 flow := flowcontrol_rts_cts elseif SerialFormat == GMC_19200_NOFLOW then baud := baud_19200 flow := flowcontrol_none elseif SerialFormat == GMC_9600_NOFLOW then baud := baud_9600 flow := flowcontrol_none elseif SerialFormat == GMC_1200_NOFLOW then baud := baud_1200 flow := flowcontrol_none else throw (str(me), "Invalid serial format setting") endif VerifyComSettings (serialPort, baud, flow) endfunc private func VerifyComSettings (port as comm, baud as syscmd_Baud, flow as syscmd_flowcontrol) dim dbits as syscmd_databits dim sbits as syscmd_stopbits dim parity as syscmd_parity dim baudCur as syscmd_baud dim flowCur as syscmd_flowcontrol dim bc, dbc, pc, sbc, fc as syscmd if port == com1 then bc := sys_com1baud dbc := sys_com1databits pc := sys_com1parity sbc := sys_com1stopbits fc := sys_com1flowcontrol elseif port == com2 then bc := sys_com2baud dbc := sys_com2databits pc := sys_com2parity sbc := sys_com2stopbits fc := sys_com2flowcontrol endif #ifnot _TOOL 'Don't set the settings in layout view 'Check each serial port paramater and set as appropriate GetsystemSetting (bc, baudCur, sysread_current) if baudCur <> baud then SetSystemSetting (bc, baud, SYSACT_DONOW) endif GetSystemSetting (fc, flowCur, sysread_current) if flowCur <> flow then SetSystemSetting (fc, flow, SYSACT_DONOW) endif GetSystemSetting (dbc, dbits, sysread_current) if dbits <> databits_8 then SetSystemSetting (dbc, databits_8, SYSACT_DONOW) endif GetSystemSetting (pc, parity, sysread_current) if parity <> parity_none then SetSystemSetting (pc, parity_none, SYSACT_DONOW) endif GetSystemSetting (sbc, sbits, sysread_current) if sbits <> stopbits_1 then SetSystemSetting (sbc, stopbits_1, SYSACT_DONOW) endif 'Set the timeout if (port == com1) or (port == com2) then SetSerialTimeout (port, 1) endif #endif endfunc private dim comBuf[] as byte private func CommReceive (data[] as byte) returns boolean handles MSG_COMM_RECEIVE dim pos1, pos2 as integer 'Special handling of suspended data if suspended then if not awaitingsuspense then suspendedRecv := data userDirectMsg (suspendNotify, GMC_SuspendCommReceive, suspendNotifyParm, true) return true endif endif if unsolicitedAware then ParseForUnsolicitedMessages (data) else comBuf := concat (comBuf, data) endif label top pos1 := find (comBuf, 0, -1, GMC_TermStr) if pos1 > 0 then pos2 := find (combuf, pos1, -1, ":") if pos2 > 0 then ' we found a complete response Parse (left (combuf, pos1)) combuf := mid(combuf, pos2+1, -1) 'goto top endif endif return true endfunc #doc prop curResponse ~This property contains the most recent response from the controller. It is guarenteed to be ~valid during a GMC_CommSuccess message. At any other time the value of this property ~may not be valid. It is the responsibility of the object that recieves the GMC_CommSuccess ~to parse the response appropriately #hidden dim curResponse as string private dim recvCmdBrks[GMC_MaxTxLen] as integer #hidden dim curFailureReason as GMC_FailureReason private func Parse(data[] as byte) dim cpos, qpos, oldPos as unibyte dim count as integer dim i, loopTerm, brkIdx, oldBrkIdx as integer dim errs[] as integer dim errorExists as boolean cpos := find (data, 0, -1, ":") qpos := find (data, 0, -1, "?") count = 1 recvCmdBrks[0] := -1 while (cPos < 65535) or (qPos < 65535) do if cPos < qPos then recvCmdBrks[count] := cPos count := count + 1 oldPos := cPos+1 cPos := find (data, oldPos, -1, ":") 'No need to find question else recvCmdBrks[count] := qPos 'note that an error occured redim (errs, len(errs)+1) errs[len(errs)-1] := count errorExists := true count := count + 1 oldPos := qPos+1 qPos := find (data, oldPos, -1, "?") 'No need to find colon endif loop 'Note the (count - 1) is because we started the count at one. We started the 'count at one because parsing the data for curResponse out is easier when we do if pendingCmdCount <> count - 1 then Retransmit("Unexpected controller response") else loopTerm := (pendingPktTail + 1) mod GMC_MaxPendingStreams i := tailIdx brkIdx := 0 oldBrkIdx := 0 if not errorExists then 'slightly faster loop for the common case of no errors! while i <> loopTerm do brkIdx := brkIdx + cmdCount[i] curResponse := mid(data, recvCmdBrks[oldBrkIdx]+1, recvCmdBrks[brkIdx] - recvCmdBrks[oldBrkIdx]-1) UserDirectMsg (notify[i], GMC_CommSuccess, notifyCodes[i], true) i := (i+1) mod GMC_MaxPendingStreams oldBrkIdx := brkIdx loop else 'slower loop where we have to see what errors exist and what to do about it! cpos := 0 'reuse cpos as an array index redim (errs, len(errs)+1) 'give ourselves an extra padding index while i <> loopTerm do brkIdx := brkIdx + cmdCount[i] curResponse := mid(data, recvCmdBrks[oldBrkIdx]+1, recvCmdBrks[brkIdx] - recvCmdBrks[oldBrkIdx]-1) if (oldBrkIdx+1 <= errs[cPos]) and (brkIdx >= errs[cPos]) then 'this command stream contained the error curFailureReason := GMC_FailBadCommand UserDirectMsg (notify[i], GMC_CommFailure, notifyCodes[i], true) cPos := cPos + 1 if displayErrors == GMC_DisplayAllErrors then MakeVisible (str(notify[i]) + ": Bad command") endif else UserDirectMsg (notify[i], GMC_CommSuccess, notifyCodes[i], true) endif i := (i+1) mod GMC_MaxPendingStreams oldBrkIdx := brkIdx loop endif ClearPendingPktInfo() endif endfunc private func ReceiveFail() dim i, loopTerm as integer loopTerm := (pendingPktTail + 1) mod GMC_MaxPendingStreams i := tailIdx curFailureReason := GMC_FailCommunications curResponse := "" while i <> loopTerm do UserDirectMsg (notify[i], GMC_CommFailure, notifyCodes[i], true) i := (i+1) mod GMC_MaxPendingStreams loop ClearPendingPktInfo() endfunc private func ClearPendingPktInfo() if awaitingResponse then awaitingResponse := false xmitbuf := mid (xmitBuf, pendingPktLen, -1) tailIdx := (pendingPktTail + 1) mod GMC_MaxPendingStreams endif TransmitStream() endfunc private dim xmitBuf[] as byte private dim lengths[GMC_MaxPendingStreams] as integer private dim cmdCount[GMC_MaxPendingStreams] as integer private dim notify[GMC_MaxPendingStreams] as objref private dim notifyCodes[GMC_MaxPendingStreams] as integer private dim headIdx as integer private dim tailIdx as integer #doc func SendAsciiCommandStream ~Use this command to send an arbitrary stream of commands to the controller. When the ~controller has responed, this object will send a GMC_CommSuccess or a GMC_CommFailure ~message to the notifyObj with the notifyCode as the paramater. #param stream: A semicolon separated list of commands to send to a Galil motion controller #param notifyObj:The object that will receive notification once the controller has responeded to the commands #param notifyCode:This value will be sent to the notifyObj in the notification message. It is primarily useful for objects that may poll different values at different times so that it can differenciate to which query it is receiving a response. func SendAsciiCommandStream(stream[] as byte, notifyObj as objref, notifyCode as integer) returns boolean return SendAsciiCommandStreamCounted (stream, notifyObj, notifyCode, GMC_CountCommands(stream)) endfunc #doc func SendAsciiCommandStreamCounted ~Use this command to send an arbitrary stream of commands to the controller. When the ~controller has responed, this object will send a GMC_CommSuccess or a GMC_CommFailure ~message to the notifyObj with the notifyCode as the paramater. This function is ~faster than SendAsciiCommandStream. Call this function if you know exactly ~how many commands are in stream. You generally do that by calling the global function ~GMC_CountCommands. #param stream: A semicolon separated list of commands to send to a Galil motion controller #param notifyObj:The object that will receive notification once the controller has responeded to the commands #param notifyCode:This value will be sent to the notifyObj in the notification message. It is primarily useful for objects that may poll different values at different times so that it can differenciate to which query it is receiving a response. #param count:The number of commands in the command stream. This value must correctly identify the number of commands in the stream, or a communications failure will occur. You can obtain the proper value by calling GMC_CountCommands on your stream of commands. func SendAsciiCommandStreamCounted (stream[] as byte, notifyObj as objref, -> notifyCode as integer, count as integer) returns boolean dim strLen as integer dim nextHeadIdx as integer 'Cannot transmit if using no comm method if commMethod == GMC_None then return false endif nextHeadIdx := (headIdx + 1) mod GMC_MaxPendingStreams strlen = len(stream) if len(stream) >= GMC_MaxTxLen then return false elseif (strlen <= 0) or (nextHeadIdx == tailIdx) then return false endif ' Add terminator if necessary if stream[strlen-1] <> ';' then stream := stream + ";" strLen := strLen + 1 endif xmitBuf := concat(xMitBuf, stream) lengths[headIdx] := strLen cmdCount[headIdx] := count notify[headIdx] := notifyObj notifyCodes[headIdx] := notifyCode headIdx := nextHeadIdx TransmitStream() return true endfunc private dim awaitingResponse as boolean private dim pendingPktTail as integer private dim pendingPktLen as integer private dim pendingPktTimeIdx as integer private dim pendingRetries as integer private dim pendingCmdCount as integer private dim curTimeIdx as integer private dim timeoutCounts as integer private dim isVisible as boolean init isVisible := false private dim visMessage as string private dim visTimeIdx as integer private func TransmitStream () dim sum, prevSum as integer dim prevTail as integer dim curTail as integer dim cmdSum, prevCmdSum as integer 'Reasons why we might not be able to transmit if (enetState <> GMC_Serial) and (enetState <> GMC_Enet) then 'Not connected return endif if awaitingResponse then return 'Currently waiting for a response. endif if suspended then 'Are we suspended for special communications? if awaitingSuspense then awaitingSuspense := false UserDirectMsg (suspendNotify, GMC_SuspendSuccessNotify, suspendNotifyParm, false) endif return endif if headIdx == tailIdx then 'Nothing to transmit return endif curTail := tailIdx sum := lengths[curTail] cmdSum := cmdCount[curTail] do prevTail := curTail prevSum := sum prevCmdSum := cmdSum curTail := (curTail + 1) mod GMC_MaxPendingStreams sum := sum + lengths[curTail] cmdSum := cmdSum + cmdCount[curTail] loop while (curTail <> headIdx) and (sum < GMC_MaxTxLen) 'Since the loop always takes us one iteration too far, use prevTail and prevSum awaitingResponse := true transmit (thePort, left(xmitBuf, prevSum) + GMC_SpecialTerm, false) pendingPktTail := prevTail pendingPktLen := prevSum pendingRetries := 0 pendingPktTimeIdx := curTimeIdx pendingCmdCount := prevCmdSum endfunc private func Retransmit (reason as string) if commMethod == GMC_EthernetTCP then return 'No Retry on TCP endif pendingRetries := pendingRetries + 1 if pendingRetries > maxRetries then MakeVisible(reason) ReceiveFail() else transmit (thePort, left(xmitBuf, pendingPktLen) + GMC_SpecialTerm, false) pendingPkttimeIdx := curTimeIdx MakeVisible(reason + ": Retry " + str(pendingRetries) + " / " + str(maxRetries)) endif endfunc private func MakeVisible(data as string) if displayErrors == GMC_DisplayNone then return endif if not isVisible then isVisible := true Resize (me, GetPosInfo(default, Get_Width), GMC_CommObjHeight) endif visMessage := str(me) + ": " + data visTimeIdx := curTimeIdx SendToFront(me) Rerender(me) endfunc private func MakeInvisible() isVisible := false Resize (me, 0,0) endfunc private func Timetick () handles MSG_TIMETICK curTimeIdx := curTimeIdx + 1 if awaitingResponse then if commMethod <> GMC_EthernetTCP then if curTimeIdx >= pendingPktTimeIdx + timeoutCounts then Retransmit("Response Timeout") endif endif endif if IsVisible then if curTimeIdx >= visTimeIdx + GMC_VisTimeout then MakeInvisible() endif endif endfunc private func Draw () handles MSG_DRAW SetFgColor (RGB_RED) SetBGColor (RGB_Yellow) _TextRect (0, GetPosInfo(me, Get_Y), GetPosInfo(default, GET_Width), GMC_CommObjHeight, visMessage, default, HA_CENTER, VA_CENTER) endfunc private func ParseForUnsolicitedMessages(data[] as byte) 'This function will update comBuf with the solicited portion of the message. 'Unsolicited portions will be added to unsolicitedBuf. The UnsolicitedMessageReceived 'event will be called if a complete message is received dim i, max as integer dim oldPos as integer dim state, oldState as boolean max = len(data)-1 for i = 0 to max state := ( (data[i] and byte(0x80)) <> 0) if state <> oldState then if oldState then AddUnsolicited (mid (data, oldPos, i-oldPos), i-oldPos-1) else comBuf := comBuf+ mid(data, oldPos, i-oldPos) endif oldState := state oldPos := i endif next 'Now add remainder if state then AddUnsolicited (mid (data, oldPos, i-oldPos), i-oldPos-1) else comBuf := comBuf+ mid(data, oldPos, i-oldPos) endif endfunc private func AddUnsolicited (data[] as byte, leng as integer) dim i as integer dim p1, p2, oldPos as unibyte for i = 0 to leng data[i] := data[i] and byte(0x7F) next UnsolicitedMessageReceived(data) endfunc #doc override UnsolicitedMessageReceived #param msg:This is the text of the unsolicited message. ~This event is called whenever unsolicited messages are received from the controller. The ~msg paramater contains the actual message. Unsolicited messages are NOT parsed ~for content, but rather are given immediately to this funciton. This means that the user ~is responsible for parsing the message. It is possible that two unsolicited messages may ~be passed to this event at once. It is also possible that a single unsolicited message may ~be split in to two calls to this event. func UnsolicitedMessageReceived(msg as string) return endfunc private dim suspended, awaitingSuspense as boolean private dim suspendNotify as objref private dim suspendNotifyParm as integer #doc prop suspendedRecv ~This property holds the most recent bit of data received by this object once it has been ~suspended. #hidden dim suspendedRecv[] as byte #doc func SuspendCommunications ~This function is intended for internal use by advanced GMC objects. Do not use it, unless ~you are implementing a special object that has special communication needs.

~This function breaks off normal communication with the motion controller. Communication ~requests are queued, until communications are resumed. This function returns true if ~the request has been successfully processed, however, you MUST NOT assume that the ~communications have actually been suspended until the object indicated by the notify ~paramater has received the GMC_SuspendSuccessNotify message.

~Once this object has been suspended, any incomming serial data will be stored in the property ~suspendedRecv and notify will be informed of the data reception via a ~GMC_SuspendCommReceive message. #param notify:Indicates the object that requested the suspension. This object will receive the GMC_SuspendSuccessNotify message once the suspension has taken effect #param parm:This value will be passed to notify as the paramater to the GMC_SuspendSuccessNotify message. func SuspendCommunications(notify as objref, parm as integer) returns boolean if (enetState <> GMC_Serial) and (enetState <> GMC_Enet) then 'Not connected return false endif suspended := true awaitingSuspense := true suspendNotify := notify suspendNotifyParm := parm TransmitStream() return true endfunc #doc func ResumeCommunications ~This function is intended for internal use by advanced GMC objects. Do not use it, unless ~you are implementing a special object that has special communication needs.

~This function resumes normal communications after the communications had been suspended func ResumeCommunications() suspended := false awaitingSuspense := false suspendNotify := empty suspendNotifyParm := 0 TransmitStream() endfunc #doc func IsSuspended ~This function is intended for internal use by advanced GMC objects. Do not use it, unless ~you are implementing a special object that has special communication needs.

~This function returns true if communications are currently suspended, false otherwise. func IsSuspended() returns boolean return (suspended) and (not awaitingSuspense) endfunc #doc func SuspendTransmit ~This function is intended for internal use by advanced GMC objects. Do not use it, unless ~you are implementing a special object that has special communication needs.

~This function is used to perform a special transmission when communications are suspended with ~the motion controller. This can only be used when communication is suspended. It will return ~false if communication is not suspended. Otherwise it transmits the data and returns true. #param data:This data will be transmitted to the controller without respect of formatting. As the communications object does not examine this data, it will not expect a response of any sort from the controller. func SuspendTransmit (data[] as byte) returns boolean if (not suspended) or (awaitingSuspense) then return false endif if (enetState <> GMC_Serial) and (enetState <> GMC_Enet) then 'Not connected return false endif transmit (thePort, data, false) return true endfunc Enddef #endif #endfile Te ˜ž“–“ ’œ Œœ ˜ž“–“œ’’Š‘–œž‹–‘Œ dtd ˜ž“–“ ’œ Œœ ˜ž“–“œ’’Š‘–œž‹–‘Œ dd} ˜’œ ›ž‹ž‹†šÐD} ˜’œ Œ–‹–‘dÀ}˜’œ Œ–‹–‘šeÀ}˜’œ œ’’ž‘›š›Œ–‹–‘fÀ}˜’œ “ž‹œ—š›Œ–‹–‘gÀ}˜’œ ›Šž“š‘œ›šŒ–‹–‘hÀ} ˜’œ ‹ŽŠšiÀ} ˜’œ Œˆ–‹œ—šŒjÀ}˜’œ ž‘ž“˜–‘Š‹ÎÀ}˜’œ ž‘ž“˜–‘Š‹ÍÀ}˜’œ ž‘ž“˜–‘Š‹ÌÀ}˜’œ ž‘ž“˜–‘Š‹ËÀ}˜’œ ž‘ž“˜–‘Š‹ÊÀ}˜’œ ž‘ž“˜–‘Š‹ÉÀ}˜’œ ž‘ž“˜–‘Š‹ÈÀ}˜’œ ž‘ž“˜–‘Š‹Ç dd}˜’œ ž‡–ŒÐD} ˜’œ ž‡–Œ ‡XÀ} ˜’œ ž‡–Œ †YÀ} ˜’œ ž‡–Œ …ZÀ} ˜’œ ž‡–Œ ˆWÀ} ˜’œ ž‡–Œ šEÀ} ˜’œ ž‡–Œ ™FÀ} ˜’œ ž‡–Œ ˜GÀ} ˜’œ ž‡–Œ —H dd}˜’œ š‰š“Œ‹†“šÐD}˜’œ š‰š“ž–Œš›À}˜’œ š‰š“ŒŠ‘”š‘À} ˜’œ š‰š“‘‘š d d } ˜’œ Œš–ž“™’ž‹ÐD } ˜’œ ÎÆÍÏÏ ‹Œ œ‹Œ  À } ˜’œ ÆÉÏÏ ‹Œ œ‹Œ  À } ˜’œ ÎÍÏÏ ‹Œ œ‹Œ  À } ˜’œ ÎÆÍÏÏ ‘™“ˆ  À } ˜’œ ÆÉÏÏ ‘™“ˆ  À } ˜’œ ÎÍÏÏ ‘™“ˆ   d td ˜’œ š‡‹š‘›š›œ’’›šŒ d d } ˜’œ š‘š‹Œ‹ž‹šŒÐD } ˜’œ Œš–ž“  À } ˜’œ š‘›–‘˜  À } ˜’œ š‘š‹  À } ˜’œ –‘‰ž“–›   d d } ˜’œ œ’’’š‹—›ÐD } ˜’œ ŠŒšŒš–ž“  À } ˜’œ š‹—š‘š‹Š›  À } ˜’œ š‹—š‘š‹‹œ  À } ˜’œ ‘‘š   d d } ˜’œ ›–ŒšŒÐD } ˜’œ ›–Œ“ž†‘‘šÀ } ˜’œ ›–Œ“ž†œ’’šŒÀ } ˜’œ ›–Œ“ž†ž““šŒ dd}˜’œ ™ž–“ŠššžŒ‘ÐD}˜’œ ™ž–“œ’’Š‘–œž‹–‘ŒÀ}˜’œ ™ž–“ž›œ’’ž‘›À}˜’œ ™ž–“Š‘š‡šœ‹š››ž‹ž d dàD} ˜’œ ’ž‡Œ‹šž’ dàD}˜’œ ’ž‡š‘›–‘˜Œ‹šž’Œ dàD} ˜’œ ’ž‡‹‡“š‘P dàD}˜’œ Œšœ–ž“‹š’C²žÝ¿Ýò dàD} ˜’œ ‹š’Œ‹C¿ dàD}˜’œ ‰–Œ‹–’šŠ‹ d dàD0?}˜’œ œ’’ŒŠœœšŒŒ dàD0?}˜’œ œ’’™ž–“Šš dàD0?}˜’œ ŒŠŒš‘›ŒŠœœšŒŒ‘‹–™† dàD0?}˜’œ ŒŠŒš‘›œ’’šœš–‰š d d deÀD}˜’œ œ’’•ŒÐD€> deÀD}˜’œ œ’’•—š–˜—‹ÐD€> dÀD}˜’œ ›š™žŠ“‹œ’’•ÐDà>}˜ž“–“œ’’Š‘–œž‹–‘ d d! d"€W"}"˜’œ Œš‹œ’’•Œ€"}"•ÐD"à>"" d#ÀD#}#’ŠÀ#}#’›À#}#’“À#}#’À#}#‘“‡À#}#‘“†ÐD#€># d$ d%^%}%˜’œ œ’’•—š–˜—‹Ð%%^% d&}&˜š‹›™™‘‹’š‹–œŒ€&}&’“À&}&’À&}&’ŠÀ&}&’›À&}&‘“‡À&}&‘“†À&P&À&}& ™‘‹ ‘’ž“& d'}'˜’œ œ’’•—š–˜—‹Ð'}'’а'}'’› d(@^( d) d*}*š“œž‹š€*}*•À**À*}*˜’œ œ’’•Œ *}*˜’œ œ’’•—š–˜—‹* d+}+˜’œ œ’’•Œ+}+˜’œ œ’’•Œ°++ d,ÐW, d- d. d/€W/}/˜’œ ‰š–™†œ’’•€/}/ œ’’•šœ‹ÐD/W/ W/à>/}/˜ž“–“œ’’Š‘–œž‹–‘/ d0^0}0 œ’’•šœ‹Ð0}0š’‹†^0 d1}1 œ’’•šœ‹1}1˜’œ ›š™žŠ“‹œ’’• d2„d2 ‹“}2 ‹“ šŒ–Œ‹€2}2 œ’’•šœ‹2 d2 d3@^3 d4ÐW4 d5 d6e6ÀD6}6˜’œ œŠ“œž“‹ÐD6€>6 d7 d8€W8}8˜’œ ˜š‹“œž“‹€88°W8P?8 d9^9}9˜’œ œŠ“œž“‹Ð99^9 d:}: Œšš›ž‘›’‘Š’€:: d;};˜’œ œŠ“œž“‹;;'°;€>;€;;@œ ;}; ˜š‹ž‘›’‘Š’€;;; d<0^< d=}=˜’œ œŠ“œž“‹=€=€=}=˜’œ œŠ“œž“‹Ð=='=À==@œ=°==' d>@^> d? d@ð^@}@˜’œ œŠ“œž“‹ dAÐWA dB dC dD€WD}D˜’œ œŠ‘‹œ’’ž‘›Œ€D}DŒ‹šž’°DÐDÐDD >DD°WD€>D dEÀDE}EŒŒÀE}EŒ‘ÐDEP?E dFÀDF}F“›ŒÐDFP?F dGÀDG}GœŠ‘‹ÐDG€>G dH dI dJ dK dL dM}MŒŒM}M™–‘›€M}MŒ‹šž’ÀM}M“›ŒÀMÐMMÀMCMĐM dN}NŒ‘N}N™–‘›€N}NŒ‹šž’ÀN}N“›ŒÀNÐNNÀNCNõN dO dP dQ€^Q€Q}QŒŒàQ}QŒ‘Q^Q dR^R€R}RŒŒÀR}RŒ‘R^R dS}SœŠ‘‹S}SœŠ‘‹°SS dT dU}U“›ŒU}UŒŒ°UU dV}VŒŒV}V™–‘›€V}VŒ‹šž’ÀV}V“›ŒÀVÐVVÀVCVĐV dW0^W dX}XœŠ‘‹X}XœŠ‘‹°XX dY dZ}Z“›ŒZ}ZŒ‘°ZZ d[}[Œ‘[}[™–‘›€[}[Œ‹šž’À[}[“›ŒÀ[Ð[[À[C[õ[ d\@^\ d] ^] d^ d_ d`}`“›Œ`}`“š‘€`}`Œ‹šž’`Ð`` da^a}a“›ŒÀaa}^a db dc dd de^e€e}eŒ‹šž’°e}e“›ŒÐeàee;e^e df}fœŠ‘‹f}fœŠ‘‹°ff dg@^g dh@^h dið^i}iœŠ‘‹ djÐWj dk dl dm€Wm}m˜’œ›ž‹ž‹†š‹œ’’ž‘›€m}m›‹ÐDm}m ˜’œ ›ž‹ž‹†šÀm}mž‡–ŒÐDm}m˜’œ ž‡–ŒÀm}m ŠŒšœŠŒ‹’ÐDm°>mÀm}nœŠŒ‹’ÐDnÀ>nn°WnÀ>n do dpÀDp}p‹’Œ‹°ppÐpÐDp >p dqÀDq}q‹’–‘‹ÐDq€>q dr}r‹’Œ‹°rrÐrr}rž‡–Œ ds dt^t}t ŠŒšœŠŒ‹’^t du dv}v‹’–‘‹Ðv}v˜’œ œŠ‘‹œ’’ž‘›Œ€v}vœŠŒ‹’v dw^w}w‹’–‘‹Àww^w dxð^xCx«¯§Ä dy ^y}y‹’–‘‹Ðyy^y dzð^z}zœŠŒ‹’ d{0^{ d| d}}}‹’–‘‹Ð}}}™–‘›€}}}œŠŒ‹’À}}À}Ð}}À}C}Đ} d~}~œŠŒ‹’Ð~}~“𙋀~}~œŠŒ‹’À~}~‹’–‘‹~ d}‹’–‘‹Ð}™–‘›€}œŠŒ‹’ÀÀÐÀCõ d€}€œŠŒ‹’Ѐ}€“𙋀€}€œŠŒ‹’À€}€‹’–‘‹€ dð^}œŠŒ‹’°CÄ d‚@^‚ dƒ ^ƒ}ƒ›‹ƒ}ƒ˜’œ ž‘ž“˜–‘Š‹Ç^ƒ d„ð^„C„²ž¿Ÿ±€°„}„Œ‹€„}„›‹„°„C„¢Ä d… ^…}…›‹Ð…}… ˜’œ Œ–‹–‘^… d†ð^†C†«¯°†}†‹’Œ‹°†C†Ä d‡ ^‡}‡›‹Ð‡}‡˜’œ Œ–‹–‘š^‡ dˆð^ˆCˆ«º°ˆ}ˆ‹’Œ‹°ˆCˆÄ d‰ ^‰}‰›‹Ð‰}‰˜’œ œ’’ž‘›š›Œ–‹–‘^‰ dŠð^ŠCŠ­¯°Š}Š‹’Œ‹°ŠCŠÄ d‹ ^‹}‹›‹Ð‹}‹˜’œ “ž‹œ—š›Œ–‹–‘^‹ dŒð^ŒCŒ­³°Œ}Œ‹’Œ‹°ŒCŒÄ d ^}›‹Ð}˜’œ ›Šž“š‘œ›šŒ–‹–‘^ dŽð^ŽCŽ»ºÀÄ d ^}›‹Ð} ˜’œ ‹ŽŠš^ dð^C««°}‹’Œ‹°CÄ d‘ ^‘}‘›‹Ð‘}‘ ˜’œ Œˆ–‹œ—šŒ^‘ d’ð^’C’«¬°’}’‹’Œ‹°’C’Ä d“0^“ d”ð^”C” d•@^• d–ÐW– d— d˜ d™€W™}™˜’œ œ“šžš‡œš‹–‘€™™ dšÀDš}šš‹†Àš}šš“š‰ÐDšP?š d›ÀD›}›šŒ‹°›Ð›ÐD› >› dœ d} ˜š‹š‡œš‹–‘€}šŒ‹À}š‹†À}š“š‰ džÐWž dŸKŸKŸ KŸ@KŸ}Ÿ˜ž“–“œ’’Š‘–œž‹–‘ d @d C <¹¹¹¹¹ÏϹŒÏÏÌǹ¹Î̹¹»ÈŒÈ¹ÌÆÎ¹ÆŒËÈŒ¹¹ÌºÏÏȹÇ˹¹¹Æ¹¹¹Ì¹¹ºÈ¹¹¹¹¹ d¡ d¢ d£ d€ d¥ dŠ d§ dš d© dª d« d¬ d­ d® d¯ d° d± d² d³ dŽ dµ d¶ d· dž d¹ dºÀdº}ºŒ‹ž‘›ž›Ðdº}º‹š‡‹Œ–‘˜“š“–‘š›™ d»Àd»}»Œ‹ž‘›ž›Ðd»}» –ŒŠ‹ dŒÀdŒ}ŒŒ‹ž‘›ž›ÐdŒ}Œ™’ž‹™Š‘œ‹–‘Œ dœ dŸ d¿ dÀ dÁ d dà dÄ dÅ dÆÀDÆ}Æ œ’’’š‹—›ÐDÆ}Ƙ’œ œ’’’š‹—› dÇðDÇ}Ç œ’’’š‹—›Ç}ǘ’œ š‹—š‘š‹Š› dȀWÈ}È œ’’’š‹—›€È}È‘šˆ‰ž“ÐDÈ}Ș’œ œ’’’š‹—›È dÉ^ɀÉ}É‘šˆ‰ž“ÐÉ}ɘ’œ š‹—š‘š‹Š›ÉÀɀÉ}É‘šˆ‰ž“ÐÉ}ɘ’œ š‹—š‘š‹‹œÉ^É dÊ dË dÌ^̀Ì}Ì š‘š‹Œ‹ž‹šÐÌ}Ì ˜’œ š‘›–‘˜Ì^Ì dÍ dÎ^Î}Î‘šˆ‰ž“àÎ}Î œ’’’š‹—›^Î dÏ dÐ}Ћ—ˆ€Ð}ÐŒ‹€Ðà^АÐÀÐCÐKª‘ž“šß‹ßŒˆ–‹œ—ßš‹ˆšš‘ߪ»¯ßž‘›ß«Œ¯ßˆ—š‘ßž‘ßš‹—š‘š‹ßœ‘‘šœ‹–‘ß–Œßš‘›–‘˜Ð dÑ0^Ñ dÒ}Ò œ’’’š‹—›Ò}Ò‘šˆ‰ž“ dÓð^Ó dÔ@^Ô dÕ ^ՀÕ}Õ š‘š‹Œ‹ž‹šÐÕ}Õ˜’œ š‘š‹Õ^Õ dÖ d×^×}×‘šˆ‰ž“à×}× œ’’’š‹—›^× dØ dÙ dÚ}Ú œ’’’š‹—›Ú}Ú‘šˆ‰ž“ dÛ}Û œ“Œšš‹—š‘š‹€ېÛ dÜ}Ü š‘š‹—š‘š‹€ܐÜ dÝ0^Ý dÞ}Þ œ’’’š‹—›Þ}Þ‘šˆ‰ž“ dßð^ß dà@^à dá ^á€á}á š‘š‹Œ‹ž‹šÐá}á ˜’œ Œš–ž“á^á dâ}⠜’’’š‹—›â}⑚ˆ‰ž“ dã}㠜“ŒšŒš–ž“€ãã dä}ä š‘š‹—š‘š‹€ää då0^å dæ}æ œ’’’š‹—›æ}摚ˆ‰ž“ dç}ç š‘š‹—š‘š‹€çç dè@^è dé ^é€é}鑚ˆ‰ž“Ðé}é ˜’œ ŠŒšŒš–ž“é^é dê dë^ë€ë}ë š‘š‹Œ‹ž‹šÐë}ë ˜’œ Œš–ž“ë^ë dì}ì œ’’’š‹—›ì}쑚ˆ‰ž“ díð^í dî ^î€î}î š‘š‹Œ‹ž‹šÐî}î ˜’œ š‘›–‘˜î^î dï}ï‹—ˆ€ï}€ïà^ïïÀïCïNª‘ž“šß‹ßŒˆ–‹œ—ß‹ßŒš–ž“ßœ’’Š‘–œž‹–‘Œßˆ—–“šßš‹—š‘š‹ßœ‘‘šœ‹–‘˜ß–Œßš‘›–‘˜ï dð ^ð€ð}𠚑š‹Œ‹ž‹šÐð}𘒜 š‘š‹ð^ð dñ}ñ œ’’’š‹—›ñ}ñ‘šˆ‰ž“ dò}ò œ“Œšš‹—š‘š‹€òò dó}ó š‘Œš–ž“€óó dô ^ô}ô š‘š‹Œ‹ž‹šÐô}ô ˜’œ –‘‰ž“–›^ô dõ}õ œ’’’š‹—›õ}õ‘šˆ‰ž“ dö}ö š‘Œš–ž“€öö d÷@^÷ dø ^ø€ø}ø‘šˆ‰ž“Ðø}ø˜’œ ‘‘šø^ø dù dú^ú€ú}ú š‘š‹Œ‹ž‹šÐú}ú ˜’œ Œš–ž“ú^ú dû}û œ’’’š‹—›û}û‘šˆ‰ž“ dü}ü œ“ŒšŒš–ž“€üü dý ^ý€ý}ý š‘š‹Œ‹ž‹šÐý}ý ˜’œ š‘›–‘˜ý^ý dþ}þ‹—ˆ€þ}þŒ‹€þà^þþÀþCþIª‘ž“šß‹ßŒˆ–‹œ—ß‹ß‘ßœ’’Š‘–œž‹–‘߈—–“šßš‹—š‘š‹ßœ‘‘šœ‹–‘˜ß–Œßš‘›–‘˜þ dÿ ^ÿ€ÿ}ÿ š‘š‹Œ‹ž‹šÐÿ}ÿ˜’œ š‘š‹ÿ^ÿ d} œ’’’š‹—›}‘šˆ‰ž“ d} œ“Œšš‹—š‘š‹€ d ^€} š‘š‹Œ‹ž‹šÐ} ˜’œ –‘‰ž“–›^ d} œ’’’š‹—›}‘šˆ‰ž“ d@^ d@^ dÐW d d d  d  d  d  d ÀD }  –ž››šŒŒÐD À>  dðD} –ž››šŒŒC ÎÆÍÑÎÉÇÑÎÑÎ d€W} –ž››šŒŒ€}‘šˆ‰ž“ÐDÀ> d} –ž››šŒŒ}‘šˆ‰ž“ d d^€} š‘š‹Œ‹ž‹šÐ} ˜’œ Œš–ž“À€} š‘š‹Œ‹ž‹šÐ} ˜’œ –‘‰ž“–›^ dð^ d ^€} š‘š‹Œ‹ž‹šÐ} ˜’œ š‘›–‘˜^ d}‹—ˆ€}Œ‹€à^ÀC@ª‘ž“šß‹ßœ—ž‘˜šß¶¯ßž››šŒŒßˆ—–“šßš‹—š‘š‹ßœ‘‘šœ‹–‘ß–Œßš‘›–‘˜ d0^ d} œ“Œšš‹—š‘š‹€ d} š‘š‹—š‘š‹€ d@^ dÐW d d d d d d ÀD }  Œš–ž“‹ÐD } œ’’ d!ðD!}! Œš–ž“‹!}!œ’Î d"€W"}" Œš–ž“‹€"}"‘šˆ‰ž“ÐD"}"œ’’" d#^#}# š‘š‹Œ‹ž‹šÐ#}# ˜’œ Œš–ž“^# d$}$ œ“ŒšŒš–ž“€$$ d%}% Œš–ž“‹%}%‘šˆ‰ž“ d&}& š‘Œš–ž“€&& d'0^' d(}( Œš–ž“‹(}(‘šˆ‰ž“ d)@^) d*ÐW* d+ d, d- d. d/ d0ÀD0}0 Œš–ž“™’ž‹ÐD0}0˜’œ Œš–ž“™’ž‹ d1ðD1}1 Œš–ž“™’ž‹1}1˜’œ ÎÆÍÏÏ ‹Œ œ‹Œ d2€W2}2 Œš–ž“™’ž‹€2}2‘šˆ‰ž“ÐD2}2˜’œ Œš–ž“™’ž‹2 d3}3 Œš–ž“™’ž‹3}3‘šˆ‰ž“ d4^4}4 š‘š‹Œ‹ž‹šÐ4}4 ˜’œ Œš–ž“^4 d5}5‰š–™†œŠ‹Œš‹‹–‘˜Œ€55 d6@^6 d7ÐW7 d8 d9 d: d; d< d= d> d? d@ dA dBÀDB}B ’ž‡š‹–šŒÐDB€>B dCðDC}C ’ž‡š‹–šŒCC dD dE dF dG dH dI dJ dK dL dMÀDM}M‹–’šŠ‹ÐDM€>M dNðDN}N‹–’šŠ‹NNž dO€WO}O‹–’šŠ‹€O}O‘šˆ‰ž“ÐDO€>OO dP}P‹–’šŠ‹P}P‘šˆ‰ž“ dQ}Q ‹–’šŠ‹œŠ‘‹ŒQ}Q‘šˆ‰ž“ðQQô dRÐWR dS dT dU dV dW dX dY dZ d[ d\ d] d^ÀD^}^ ›–Œ“ž†šŒÐD^}^˜’œ ›–ŒšŒ d_ðD_}_ ›–Œ“ž†šŒ_}_˜’œ ›–Œ“ž†œ’’šŒ d` da db dc dd de df dg dh di dj dk dl dmÀDm}mŠ‘Œ“–œ–‹š›žˆžšÐDm°>m dnðDn}nŠ‘Œ“–œ–‹š›žˆžšn1n do dp€Wp}pŒ‹ž‹Š€pp dqÀWq}q’Œ˜ –‘–‹ dr ds}sš‘ž“š€sà^sÀs1ss dt}tž‹‹žœ—€tà^tÀtPtt du dv}v œ’’’š‹—›€v}v œ’’’š‹—›v dw}wš˜–Œ‹š’Œ˜—ž‘›“š€wà^wÀw}w ’Œ˜ ‹–’š‹–œ”Àwww dx dy}y˜’œ Œš‹œ’’•Œ€yà^yy dz}z‹–’šŠ‹€z}z‹–’šŠ‹z d{ d|^|}|˜’œ ›š™žŠ“‹œ’’•Ð|}|š’‹†^| d}}}˜’œ ›š™žŠ“‹œ’’•}à^} d~„d~ ‹“}~ ‹“ šŒ–Œ‹€~}~˜’œ ›š™žŠ“‹œ’’•~ d~ d@^ d€ÐW€ d d‚ dƒ`KƒÀDƒ}ƒ š‘š‹Œ‹ž‹šÐDƒ}ƒ˜’œ š‘š‹Œ‹ž‹šŒ d„ðD„}„ š‘š‹Œ‹ž‹š„}„ ˜’œ –‘‰ž“–› d…`K…€W…}… š‘š‹Œ‹ž‹š€…}…‘šˆ‰ž“ÐD…}…˜’œ š‘š‹Œ‹ž‹šŒ… d†}† š‘š‹Œ‹ž‹š†}†‘šˆ‰ž“ d‡ÐW‡ dˆ d‰`K‰ÀD‰}‰‹—š‹ÐD‰}‰œ’’ dŠ d‹`K‹€W‹}‹ š‘š‹—š‘š‹€‹‹ dŒÀDŒ}Œ–ž››°ŒÐŒÐDŒ >Œ d dŽÀDŽ}Ž ‘š‹’š‹—›ÐDŽ}Ž ‘š‹‹œ“ d^} œ’’’š‹—›Ð}˜’œ š‹—š‘š‹‹œ^ d} ‘š‹’š‹—›}‘š‹ ‹œ d‘0^‘ d’}’ ‘š‹’š‹—›’}’‘š‹ Š› d“@^“ d” d•„d•  ‹“ ž‘† d–^–}– š‘š‹Œ‹ž‹šà–}– ˜’œ –‘‰ž“–›^– d—}— ‹“ ‹žœš€—}—Œ‹€—à^——°—C—$ß¶‘‰ž“–›ßŒ‹ž‹šßˆ—š‘ߐš‘–‘˜ßš‹—š‘š‹— d˜@^˜ d™ d™ dš d›^›}› žŒš–ž››šŒŒŒ‹–‘˜€›}› –ž››šŒŒÀ›}›–ž›››^› dœ}œ‘š‹š‘€œà^œÀœ}œ ‘š‹’š‹—›Àœ}œ˜’œ ˜š‹“œž“‹€œœÀœœËÀœ}œ–ž››œ d} š‘š‹Œ‹ž‹šÐ} ˜’œ š‘›–‘˜ dž0^ž dŸ}Ÿ š‘š‹Œ‹ž‹šÐŸ}Ÿ ˜’œ –‘‰ž“–› d } œ’Š™ C  d¡}¡‹—ˆ€¡}¡Œ‹€¡à^¡¡À¡C¡¶‘‰ž“–›ß¶¯ßŸ››šŒŒÅß°¡}¡ –ž››šŒŒ¡ d¢@^¢ d£ÐW£ d€ d¥`K¥€W¥}¥ œ“Œšš‹—š‘š‹€¥¥ dŠ^Š}Š š‘š‹Œ‹ž‹šÐŠ}Š˜’œ š‘š‹^Š d§}§Š‘š˜–Œ‹š’Œ˜—ž‘›“š€§à^§À§}§’Œ˜ œ’’ šœš–‰šÀ§}§‹—š‹§ dš}š‘š‹œ“Œš€š}š‹—š‹š d©@^© dª}ª š‘š‹Œ‹ž‹šÐª}ª ˜’œ –‘‰ž“–› d«}«œ’Š™«C« d¬ÐW¬ d­ d®`K®€W®}® œ’’žœœš‹€®}®Œœ”š‹ÐD®}®œ’’® d¯ÀW¯}¯’Œ˜ œ’’ žœœš‹ d° d±^±}± š‘š‹Œ‹ž‹šà±}± ˜’œ š‘›–‘˜^± d²}²‘š‹œ“Œš€²}²Œœ”š‹² d³„d³  ‹“ ž‘† dŽ}Ž ‹“ ‹žœš€Ž}ŽŒ‹€Žà^ސްŽCŽ%¶‘‰ž“–›ßŒ‹ž‹šßˆ—š‘ß±š‹Ÿœœš‹ßšœš–‰š›Ž dµ dµ d¶@^¶ d· dž d¹}¹Š‘š˜–Œ‹š’Œ˜—ž‘›“š€¹à^¹À¹}¹’Œ˜ œ’’ šœš–‰šÀ¹}¹‹—š‹¹ dº d»}»‹—š‹»}»Œœ”š‹ dŒ}Œš˜–Œ‹š’Œ˜—ž‘›“š€Œà^ŒÀŒ}Œ’Œ˜ œ’’ šœš–‰šÀŒ}Œ‹—š‹Œ dœ dŸ}Ÿ š‘š‹Œ‹ž‹šÐŸ}Ÿ˜’œ š‘š‹ d¿ dÀ dÁ}ÁŒš‘›žŒœ––œ’’ž‘›Œ‹šž’€ÁCÁŒšÎĺ°ÏÄÀÁà^ÁÀÁÁÁ dÂÐW dà dÄ`KÄ€WÄ}Ä œ’’š€Ä}Äšœ›šÐDÄ€>ÄÀÄ}Äš’Œ˜°ÄÐÄÐDÄ >ÄÄ dÅÀWÅ}Å’Œ˜ œ’’ š dÆ dÇ}Ç ’ž”š‰–Œ–“š€ÇCǺ‹—š‘š‹ßšÅß°Ç}Çš’Œ˜Ç dÈ dÉ^É€É}É‹—š‹àÉ}Éœ’ÎϐÉÀÉ€É}É‹—š‹ÀÉ}Éœ’ΐÉ^É dÊ}Ê‘š‹œ“Œš€Ê}Ê‹—š‹Ê dË@^Ë dÌ}ÌŠ‘š˜–Œ‹š’Œ˜—ž‘›“š€Ìà^ÌÀÌ}Ì’Œ˜ œ’’ šœš–‰šÀÌ}Ì‹—š‹Ì dÍ}Í š‘š‹Œ‹ž‹šÐÍ}Í ˜’œ –‘‰ž“–› dÎ}̐’Š™ÎCÎ dÏ}Ï œ’’’š‹—›ÐÏ}Ϙ’œ ‘‘š dÐÐWÐ dÑ dÒ`KÒ€WÒ}Ò š‘Œš–ž“€ÒÒ dÓ„dÓ  ‹“ ž‘† dÔ^Ô}Ô š‘š‹Œ‹ž‹šàÔ}Ô ˜’œ –‘‰ž“–›^Ô dÕ}Õ ‹“ ‹žœš€Õ}ÕŒ‹€Õà^ՐհÕCÕ¶‘‰ž“–›ßŒ‹ž‹šßˆ—š‘ߐš‘–‘˜ß‹Õ dÖ@^Ö d× d× dØ dÙ}Ù‹—š‹Ù}Ù Œš–ž“‹ dÚ}Úš˜–Œ‹š’Œ˜—ž‘›“š€Úà^ÚÀÚ}Ú’Œ˜ œ’’ šœš–‰šÀÚ}Ú Œš–ž“‹Ú dÛ}Û‰š–™†œŠ‹Œš‹‹–‘˜Œ€ÛÛ dÜ}Ü š‘š‹Œ‹ž‹šÐÜ}Ü ˜’œ Œš–ž“ dÝ dÞ dß}ßŒš‘›žŒœ––œ’’ž‘›Œ‹šž’€ßCß «ŒÄŒšÎĺ°ÏÄÀßà^ßÀßßß dà dáÐWá dâ dã`Kã€Wã}ã œ“ŒšŒš–ž“€ãã dä}䊑š˜–Œ‹š’Œ˜—ž‘›“š€äà^äÀä}ä’Œ˜ œ’’ šœš–‰šÀä}ä Œš–ž“‹ä då}å š‘š‹Œ‹ž‹šÐå}å ˜’œ –‘‰ž“–› dæ}朐’Š™æCæ dçÐWç dè dé`Ké€Wé}鉚–™†œŠ‹Œš‹‹–‘˜Œ€éé dêÀDê}êžŠ›ÐDê}ê Œ†Œœ’› žŠ› dëÀDë}뙓ˆÐDë}댆Œœ’› ™“ˆœ‘‹“ dì dí^í}í Œš–ž“™’ž‹Ðí}혒œ ÎÆÍÏÏ ‹Œ œ‹Œ^í dî}îžŠ›î}î žŠ› ÎÆÍÏÏ dï}ˆï}ˆœ‘‹“ ‹Œ œ‹Œ dð ^ð}𠌚–ž“™’ž‹Ðð}𘒜 ÆÉÏÏ ‹Œ œ‹Œ^ð dñ}ñžŠ›ñ}ñ žŠ› ÆÉÏÏ dò}ò™“ˆò}ò™“ˆœ‘‹“ ‹Œ œ‹Œ dó ^ó}ó Œš–ž“™’ž‹Ðó}ó˜’œ ÎÍÏÏ ‹Œ œ‹Œ^ó dô}ôžŠ›ô}ô žŠ› ÎÍÏÏ dõ}õ™“ˆõ}õ™“ˆœ‘‹“ ‹Œ œ‹Œ dö ^ö}ö Œš–ž“™’ž‹Ðö}ö˜’œ ÎÆÍÏÏ ‘™“ˆ^ö d÷}÷žŠ›÷}÷ žŠ› ÎÆÍÏÏ dø}ø™“ˆø}ø™“ˆœ‘‹“ ‘‘š dù ^ù}ù Œš–ž“™’ž‹Ðù}ù˜’œ ÆÉÏÏ ‘™“ˆ^ù dú}úžŠ›ú}ú žŠ› ÆÉÏÏ dû}û™“ˆû}û™“ˆœ‘‹“ ‘‘š dü ^ü}ü Œš–ž“™’ž‹Ðü}ü˜’œ ÎÍÏÏ ‘™“ˆ^ü dý}ýžŠ›ý}ý žŠ› ÎÍÏÏ dþ}þ™“ˆþ}þ™“ˆœ‘‹“ ‘‘š dÿ0^ÿ d}‹—ˆ€}Œ‹€à^ÀC¶‘‰ž“–›ßŒš–ž“ß™’ž‹ßŒš‹‹–‘˜ d@^ d d}‰š–™†œ’Œš‹‹–‘˜Œ€} Œš–ž“‹À}žŠ›À}™“ˆ dÐW d d`K€W}‰š–™†œ’Œš‹‹–‘˜Œ€}‹ÐD}œ’’À}žŠ›ÐD} Œ†Œœ’› žŠ›À}™“ˆÐD}Œ†Œœ’› ™“ˆœ‘‹“ dÀD}›–‹ŒÐD}Œ†Œœ’› ›ž‹ž–‹Œ dÀD}Œ–‹ŒÐD}Œ†Œœ’› Œ‹–‹Œ d ÀD } ž–‹†ÐD }  Œ†Œœ’› ž–‹† d ÀD } žŠ›œŠÐD }  Œ†Œœ’› žŠ› d ÀD } ™“ˆœŠÐD } Œ†Œœ’› ™“ˆœ‘‹“ d  d ÀD } œÀ } ›œÀ } œÀ } ŒœÀ } ™œÐD } Œ†Œœ’› d d^}‹Ð}œ’Î^ d}œ} Œ†Œ œ’ΝžŠ› d}›œ}Œ†Œ œ’Λž‹ž–‹Œ d}œ}Œ†Œ œ’Ώž–‹† d}Œœ}Œ†Œ œ’ÎŒ‹–‹Œ d}™œ}Œ†Œ œ’Ι“ˆœ‘‹“ d ^}‹Ð}œ’Í^ d}œ} Œ†Œ œ’͝žŠ› d}›œ}Œ†Œ œ’Í›ž‹ž–‹Œ d}œ}Œ†Œ œ’͏ž–‹† d}Œœ}Œ†Œ œ’ÍŒ‹–‹Œ d}™œ}Œ†Œ œ’Í™“ˆœ‘‹“ d@^ d dTe ‹“ d d}˜š‹Œ†Œ‹š’Œš‹‹–‘˜€}œÀ}žŠ›œŠÀ}Œ†Œšž› œŠš‘‹ d ^ } žŠ›œŠà } žŠ›^  d!}!Œš‹Œ†Œ‹š’Œš‹‹–‘˜€!}!œÀ!}!žŠ›À!}! Œ†Œžœ‹ ›‘ˆ! d"@^" d# d$}$˜š‹Œ†Œ‹š’Œš‹‹–‘˜€$}$™œÀ$}$™“ˆœŠÀ$}$Œ†Œšž› œŠš‘‹$ d%^%}%™“ˆœŠà%}%™“ˆ^% d&}&Œš‹Œ†Œ‹š’Œš‹‹–‘˜€&}&™œÀ&}&™“ˆÀ&}& Œ†Œžœ‹ ›‘ˆ& d'@^' d( d)})˜š‹Œ†Œ‹š’Œš‹‹–‘˜€)})›œÀ)})›–‹ŒÀ)})Œ†Œšž› œŠš‘‹) d*^*}*›–‹Œà*}* ›ž‹ž–‹Œ Ç^* d+}+Œš‹Œ†Œ‹š’Œš‹‹–‘˜€+}+›œÀ+}+ ›ž‹ž–‹Œ ÇÀ+}+ Œ†Œžœ‹ ›‘ˆ+ d,@^, d- d.}.˜š‹Œ†Œ‹š’Œš‹‹–‘˜€.}.œÀ.}.ž–‹†À.}.Œ†Œšž› œŠš‘‹. d/^/}/ž–‹†à/}/ ž–‹† ‘‘š^/ d0}0Œš‹Œ†Œ‹š’Œš‹‹–‘˜€0}0œÀ0}0 ž–‹† ‘‘šÀ0}0 Œ†Œžœ‹ ›‘ˆ0 d1@^1 d2 d3}3˜š‹Œ†Œ‹š’Œš‹‹–‘˜€3}3ŒœÀ3}3Œ–‹ŒÀ3}3Œ†Œšž› œŠš‘‹3 d4^4}4Œ–‹Œà4}4 Œ‹–‹Œ Î^4 d5}5Œš‹Œ†Œ‹š’Œš‹‹–‘˜€5}5ŒœÀ5}5 Œ‹–‹Œ ÎÀ5}5 Œ†Œžœ‹ ›‘ˆ5 d6@^6 d7 d8 d9^9€9}9‹Ð9}9œ’ΐ9À9€9}9‹Ð9}9œ’͐9^9 d:}:Œš‹Œš–ž“‹–’šŠ‹€:}:‹À::: d;@^; d< d= d= d>ÐW> d? d@ dA`KAÀDA}Aœ’Š™°AÐAÐDA >A dB`KB€WB}B œ’’šœš–‰š€B}B›ž‹ž°BÐBÐDB >BB°WB°>B dCÀWC}C’Œ˜ œ’’ šœš–‰š dD dEÀDE}EŒÎÀE}EŒÍÐDE€>E dF dG dH dI^I}I ŒŠŒš‘›š›^I dJ^JJ}Jžˆž–‹–‘˜ŒŠŒš‘Œš^J dK}K ŒŠŒš‘›š›šœ‰K}K›ž‹ž dL}L ŠŒš›–šœ‹’Œ˜€L}L ŒŠŒš‘›‘‹–™†ÀL}L˜’œ ŒŠŒš‘›œ’’šœš–‰šÀL}LŒŠŒš‘›‘‹–™†ž’ÀL1LL dMð^M1M dN@^N dO@^O dP dQ^Q}QŠ‘Œ“–œ–‹š›žˆžš^Q dR}RžŒš™Š‘Œ“–œ–‹š›’šŒŒž˜šŒ€R}R›ž‹žR dS0^S dT}Tœ’Š™T}Tœ‘œž‹€T}Tœ’Š™ÀT}T›ž‹žT dU@^U dV dWà]W}W‹ dX}XŒÎX}X™–‘›€X}Xœ’Š™ÀXXÀXÐXXÀX}X ˜’œ ‹š’Œ‹X dY^Y}YŒÎàYY^Y dZ}ZŒÍZ}Z™–‘›€Z}Zœ’Š™ÀZ}ZŒÎÀZÐZZÀZCZŐZ d[^[}[ŒÍà[[^[ d\}\žŒš€\}\“𙋀\}\œ’Š™À\}\ŒÎ\\ d]}]œ’Š™]}]’–›€]}]œ’Š™À]}]ŒÍ°]]À]Ð]]] d^ d_@^_ d`@^` da dbð^b1b dcÐWc dd de df dg dh di djejÀDj}j œŠšŒ‘ŒšÐDjÀ>j dk`KkÀDk}k šœ‰œ’›”Œ°k}k ˜’œ ’ž‡‹‡“š‘ÐkÐDk€>k dl dmemÀDm}mœŠ™ž–“ŠššžŒ‘ÐDm}m˜’œ ™ž–“ŠššžŒ‘ dn do`Ko€Wo}ožŒš€o}o›ž‹ž°oÐoÐDo >oo dpÀDp}pœŒÀp}pŽŒÀp}p“›ŒÐDpP?p dqÀDq}qœŠ‘‹ÐDq€>q drÀDr}r–Àr}r“‹š’Àr}r”–›‡Àr}r “›”–›‡ÐDr€>r dsÀDs}sšŒ°sÐsÐDs€>s dtÀDt}t šš‡–Œ‹ŒÐDt°>t du}uœŒu}u™–‘›€u}u›ž‹žÀuuÀuÐuuÀuCuŐu dv}vŽŒv}v™–‘›€v}v›ž‹žÀvvÀvÐvvÀvCvÀv dw dx}xœŠ‘‹Ðxx dy}y šœ‰œ’›”Œ°yyÐyyÐyy dz€^z€z}zœŒÀzzÿÿzÀz€z}zŽŒÀzzÿÿz^z d{^{}{œŒÀ{}{ŽŒ^{ d|}| šœ‰œ’›”Œ°|}|œŠ‘‹Ð||}|œŒ d}}}œŠ‘‹}}}œŠ‘‹°}} d~}~“›Œ~}~œŒ°~~ d}œŒ}™–‘›€}›ž‹žÀ}“›ŒÀÐÀCŐ d€0^€ d} šœ‰œ’›”Œ°}œŠ‘‹Ð}ŽŒ d‚ dƒ d„}„š›–’€„}„šŒÀ„}„“𑀄}„šŒ„°„„„ d…}…šŒ°…}…“š‘€…}…šŒ…Ð……Ð……}…œŠ‘‹ d†}† šš‡–Œ‹Œ†1† d‡ dˆ}ˆœŠ‘‹ˆ}ˆœŠ‘‹°ˆˆ d‰}‰“›Œ‰}‰ŽŒ°‰‰ dŠ}ŠŽŒŠ}Š™–‘›€Š}Š›ž‹žÀŠ}А“›ŒÀŠÐŠŠÀŠCŠÀŠ d‹@^‹ dŒ ^Œ d dŽ d d d‘^‘}‘š‘›–‘˜œ’›œŠ‘‹à‘}‘œŠ‘‹Ð‘‘^‘ d’}’ š‹ž‘Œ’–‹€’C’ª‘š‡šœ‹š›ßœ‘‹““šßšŒ‘Œš’ d“0^“ d”}”“‹š’”€”}”š‘›–‘˜”‹‹ž–“°”””À”}”˜’œ ’ž‡š‘›–‘˜Œ‹šž’Œ d•}•–•}•‹ž–“–›‡ d–}–”–›‡–– d—}— “›”–›‡—— d˜^˜˜}˜ šš‡–Œ‹Œ^˜ d™ dš€^š}š–àš}𓐐‹š’^š d›}›”–›‡›}›”–›‡°›}›œ’›œŠ‘‹°›}›–Л dœ}œ œŠšŒ‘Œšœ}œ’–›€œ}œ›ž‹žÀœ}œ šœ‰œ’›”Œ°œ}œ “›”–›‡Ðœ°œœÀœ}œ šœ‰œ’›”Œ°œ}œ”–›‡ÐœÐœ}œ šœ‰œ’›”Œ°œ}œ “›”–›‡ÐœÐœœœ d} ŠŒš›–šœ‹’Œ˜€}‘‹–™†°}–НÀ}˜’œ œ’’ŒŠœœšŒŒÀ} ‘‹–™†œ›šŒ°}–НÀ1 dž}ž–ž€ž}ž–°žžžÀž}ž˜’œ ’ž‡š‘›–‘˜Œ‹šž’Œ dŸ}Ÿ “›”–›‡Ÿ}Ÿ”–›‡ d  ^  d¡0^¡ d¢ d£}£œŒ££ d€}€š›–’€€}€šŒÀ€}€“š‘€€}€šŒ€°€€€ d¥€^¥}¥–à¥}¥“‹š’^¥ dŠ}Š”–›‡Š}Š”–›‡°Š}Šœ’›œŠ‘‹°Š}Š–ÐŠ d§}§ œŠšŒ‘Œš§}§’–›€§}§›ž‹žÀ§}§ šœ‰œ’›”Œ°§}§ “›”–›‡Ð§°§§À§}§ šœ‰œ’›”Œ°§}§”–›‡Ð§Ð§}§ šœ‰œ’›”Œ°§}§ “›”–›‡Ð§Ð§§§ dš^š€š}𠐓›”–›‡°ššš}ššŒ°š}šœŒÐšš`š€š}š”–›‡ðš}ššŒ°š}šœŒÐšš^š d©}©œŠ™ž–“ŠššžŒ‘©}©˜’œ ™ž–“ž›œ’’ž‘› dª}ª ŠŒš›–šœ‹’Œ˜€ª}ª‘‹–™†°ª}ª–ЪÀª}ª˜’œ œ’’™ž–“ŠšÀª}ª ‘‹–™†œ›šŒ°ª}ª–ЪÀª1ªª d«}«œŒ«}«œŒ°«« d¬^¬}¬ ›–Œ“ž†šŒÐ¬}¬˜’œ ›–Œ“ž†ž““šŒ^¬ d­}­ ’ž”š‰–Œ–“š€­}­Œ‹€­}­‘‹–™†°­}­–Э­°­C­ Åßœž›ßœ’’ž‘›­ d®@^® d¯0^¯ d°}° ŠŒš›–šœ‹’Œ˜€°}°‘‹–™†°°}°–аÀ°}°˜’œ œ’’ŒŠœœšŒŒÀ°}° ‘‹–™†œ›šŒ°°}°–аÀ°1°° d±@^± d²}²–²€²}²–°²²²À²}²˜’œ ’ž‡š‘›–‘˜Œ‹šž’Œ d³}³ “›”–›‡³}³”–›‡ dŽ ^Ž dµ@^µ d¶}¶œ“šžš‘›–‘˜”‹–‘™€¶¶ d·@^· džÐWž d¹ dº`Kº€Wº}º šœš–‰š™ž–“€ºº d»ÀD»}»–À»}»“‹š’ÐD»€>» dŒ dœ}œ“‹š’œ€œ}œš‘›–‘˜”‹‹ž–“°œœœÀœ}œ˜’œ ’ž‡š‘›–‘˜Œ‹šž’Œ dŸ}Ÿ–Ÿ}Ÿ‹ž–“–›‡ d¿}¿œŠ™ž–“ŠššžŒ‘¿}¿˜’œ ™ž–“œ’’Š‘–œž‹–‘Œ dÀ}À œŠšŒ‘ŒšÀCÀ dÁ€^Á}Á–àÁ}Á“‹š’^Á dÂ}Â ŠŒš›–šœ‹’Œ˜€Â}‘‹–™†°Â}–ÐÂÀÂ}˜’œ œ’’™ž–“ŠšÀÂ} ‘‹–™†œ›šŒ°Â}–ÐÂÀÂ1 dÃ}ÖÀÃ}Ö°ÃÐÃÀÃ}Ø’œ ’ž‡š‘›–‘˜Œ‹šž’Œ dÄ ^Ä dÅ}Åœ“šžš‘›–‘˜”‹–‘™€ÅÅ dÆÐWÆ dÇ dÈ`KÈ€WÈ}Èœ“šžš‘›–‘˜”‹–‘™€ÈÈ dÉ^É}Éžˆž–‹–‘˜šŒ‘Œš^É dÊ}Êžˆž–‹–‘˜šŒ‘ŒšÊAÊ dË}ˇ’–‹Š™Ë}Ë’–›€Ë}ˇ’–‹Š™ÀË}Ë š‘›–‘˜”‹“š‘ÀËÐËËË dÌ}Ì‹ž–“–›‡Ì€Ì}Ìš‘›–‘˜”‹‹ž–“°Ì̐ÌÀÌ}̘’œ ’ž‡š‘›–‘˜Œ‹šž’Œ dÍ@^Í dÎ}΋ž‘Œ’–‹Œ‹šž’€ÎÎ dÏÐWÏ dÐ dÑ`KÑÀDÑ}ч’–‹Š™°ÑÐÑÐDÑ >Ñ dÒ`KÒÀDÒ}Ò“š‘˜‹—Œ°Ò}Ò˜’œ ’ž‡š‘›–‘˜Œ‹šž’ŒÐÒÐDÒ€>Ò dÓ`KÓÀDÓ}Óœ’›œŠ‘‹°Ó}Ó˜’œ ’ž‡š‘›–‘˜Œ‹šž’ŒÐÓÐDÓ€>Ó dÔ`KÔÀDÔ}Ô‘‹–™†°Ô}Ô˜’œ ’ž‡š‘›–‘˜Œ‹šž’ŒÐÔÐDÔà>Ô dÕ`KÕÀDÕ}Õ ‘‹–™†œ›šŒ°Õ}Õ˜’œ ’ž‡š‘›–‘˜Œ‹šž’ŒÐÕÐDÕ€>Õ dÖ`KÖÀDÖ}Ö—šž›–›‡ÐDÖ€>Ö d×`K×ÀD×}׋ž–“–›‡ÐD×€>× dØ dÙ dÚ dÛ dÜ dÝ dÞ dß dà€Wà}àŒš‘›žŒœ––œ’’ž‘›Œ‹šž’€à}àŒ‹šž’°àÐàÐDà >àÀà}à ‘‹–™†•ÐDàà>àÀà}à ‘‹–™†œ›šÐDà€>àà°Wà°>à dáð^á}ጚ‘›žŒœ––œ’’ž‘›Œ‹šž’œŠ‘‹š›€á}ጋšž’Àá}á ‘‹–™†•Àá}á ‘‹–™†œ›šÀá}ᘒœ œŠ‘‹œ’’ž‘›Œ€á}ጋšž’áá dâÐWâ dã dä då dæ dç dè dé dê dë dì dí dî dï€Wï}‘›žŒœ––œ’’ž‘›Œ‹šž’œŠ‘‹š›€ï}šž’°ïÐïÐDï >ïÀï}ï ‘‹–™†•ÐDïà>ïÀï}𠑐‹–™†œ›šÐDð€>ðÀð}𜐊‘‹ÐDð€>ðð°Wð°>ð dñÀDñ}ñŒ‹“š‘ÐDñ€>ñ dòÀDò}ò ‘š‡‹—šž›–›‡ÐDò€>ò dó dô dõ^õ}õ œ’’’š‹—›Ðõ}õ˜’œ ‘‘š^õ döð^öAö d÷@^÷ dø dù}ù ‘š‡‹—šž›–›‡ù€ù}ù—šž›–›‡°ùùùÀù}ù˜’œ ’ž‡š‘›–‘˜Œ‹šž’Œ dú}úŒ‹“š‘Ðú}ú“š‘€ú}úŒ‹šž’ú dû^û}û“š‘€û}ûŒ‹šž’ûðû}û ˜’œ ’ž‡‹‡“š‘^û düð^üAü dý ^ý€ý}ýŒ‹“š‘ýýýÀý€ý}ý ‘š‡‹—šž›–›‡Ðý}ý‹ž–“–›‡ý^ý dþð^þAþ dÿ@^ÿ d d d^}Œ‹šž’°}Œ‹“š‘ÐÐà;^ d}Œ‹šž’}Œ‹šž’°CÄ d}Œ‹“š‘}Œ‹“š‘° d@^ d d}‡’–‹Š™}œ‘œž‹€}‡’–‹Š™À}Œ‹šž’ d}“š‘˜‹—Œ°}—šž›–›‡Ð}Œ‹“š‘ d } œ’›œŠ‘‹° } —šž›–›‡Ð  } œŠ‘‹ d } ‘‹–™†° } —šž›–›‡Ð  }  ‘‹–™†• d }  ‘‹–™†œ›šŒ° } —šž›–›‡Ð  }  ‘‹–™†œ›š d } —šž›–›‡ }  ‘š‡‹—šž›–›‡ d  d}‹ž‘Œ’–‹Œ‹šž’€ d dð^1 dÐW d d`KÀD}žˆž–‹–‘˜šŒ‘ŒšÐD°> d`KÀD}š‘›–‘˜”‹‹ž–“ÐD€> d`KÀD} š‘›–‘˜”‹“š‘ÐD€> d`KÀD}š‘›–‘˜”‹‹–’𖛇ÐD€> d`KÀD}š‘›–‘˜š‹–šŒÐD€> d`KÀD}š‘›–‘˜œ’›œŠ‘‹ÐD€> d`KÀD} œŠ‹–’𖛇ÐD€> d`KÀD} ‹–’šŠ‹œŠ‘‹ŒÐD€> d`KÀD} –Œ‰–Œ–“šÐD°> dðD} –Œ‰–Œ–“šA d`KÀD} ‰–Œ’šŒŒž˜šÐDÀ> d`KÀD} ‰–Œ‹–’𖛇ÐD€> d d `K €W } ‹ž‘Œ’–‹Œ‹šž’€   d!ÀD!}!ŒŠ’À!}!š‰ŒŠ’ÐD!€>! d"ÀD"}"š‰‹ž–“ÐD"€>" d#ÀD#}#œŠ‹ž–“ÐD#€># d$ÀD$}$œ’›ŒŠ’À$}$ š‰œ’›ŒŠ’ÐD$€>$ d% d& d'^'€'}' š‘š‹Œ‹ž‹šà'}' ˜’œ Œš–ž“'`'€'}' š‘š‹Œ‹ž‹šà'}'˜’œ š‘š‹'^' d(ð^( d)@^) d*^*}*žˆž–‹–‘˜šŒ‘Œš^* d+ð^+ d,@^, d-^-}- ŒŠŒš‘›š›^- d. d/^/}/žˆž–‹–‘˜ŒŠŒš‘Œš^/ d0}0žˆž–‹–‘˜ŒŠŒš‘Œš0A0 d1}1 ŠŒš›–šœ‹’Œ˜€1}1 ŒŠŒš‘›‘‹–™†À1}1˜’œ ŒŠŒš‘›ŒŠœœšŒŒ‘‹–™†À1}1ŒŠŒš‘›‘‹–™†ž’À1A11 d2@^2 d3ð^3 d4@^4 d5^5}5—šž›–›‡Ð5}5‹ž–“–›‡^5 d6ð^6 d7@^7 d8 d9}9œŠ‹ž–“9}9‹ž–“–›‡ d:}:ŒŠ’:}:“š‘˜‹—Œ°:}:œŠ‹ž–“Ð: d;};œ’›ŒŠ’;};œ’›œŠ‘‹°;};œŠ‹ž–“Ð; d<^< d=}=š‰‹ž–“=}=œŠ‹ž–“ d>}>š‰ŒŠ’>}>ŒŠ’ d?}? š‰œ’›ŒŠ’?}?œ’›ŒŠ’ d@ dA}AœŠ‹ž–“A€A}AœŠ‹ž–“°AAAÀA}A˜’œ ’ž‡š‘›–‘˜Œ‹šž’Œ dB}BŒŠ’B}BŒŠ’°B}B“š‘˜‹—Œ°B}BœŠ‹ž–“ÐB dC}Cœ’›ŒŠ’C}Cœ’›ŒŠ’°C}Cœ’›œŠ‘‹°C}CœŠ‹ž–“ÐC dD dE ^E€^E€E}EœŠ‹ž–“àE}E—šž›–›‡E`E€E}EŒŠ’ÀE}E ˜’œ ’ž‡‹‡“š‘E dF dG dH dI dJ}Jžˆž–‹–‘˜šŒ‘ŒšJ1J dK}K‹ž‘Œ’–‹€K}K‹—š‹ÀK}K“𙋀K}K‡’–‹Š™ÀK}Kš‰ŒŠ’K°K}K˜’œ Œšœ–ž“‹š’ÀKAKK dL}Lš‘›–‘˜”‹‹ž–“L}Lš‰‹ž–“ dM}M š‘›–‘˜”‹“š‘M}Mš‰ŒŠ’ dN}Nš‘›–‘˜š‹–šŒNN dO}Oš‘›–‘˜”‹‹–’𖛇O}O œŠ‹–’𖛇 dP}Pš‘›–‘˜œ’›œŠ‘‹P}P š‰œ’›ŒŠ’ dQÐWQ dR dS`KS€WS}S š‹ž‘Œ’–‹€S}SšžŒ‘ÐDSÀ>SS dT^T}T œ’’’š‹—›ÐT}T˜’œ š‹—š‘š‹‹œ^T dUð^U dV@^V dW dX}Xš‘›–‘˜š‹–šŒX}Xš‘›–‘˜š‹–šŒ°XX dY dZ^Z}Zš‘›–‘˜š‹–šŒàZ}Z ’ž‡š‹–šŒ^Z d[}[ ’ž”š‰–Œ–“š€[}[šžŒ‘[ d\}\ šœš–‰š™ž–“€\\ d]0^] d^}^‹ž‘Œ’–‹€^}^‹—š‹À^}^“𙋀^}^‡’–‹Š™À^}^ š‘›–‘˜”‹“š‘^°^}^˜’œ Œšœ–ž“‹š’À^A^^ d_}_š‘›–‘˜”‹‹–’𖛇_}_ œŠ‹–’𖛇 d`}` ’ž”š‰–Œ–“š€`}`šžŒ‘°`C` Åßß­š‹†ß°`}`Œ‹€`}`š‘›–‘˜š‹–šŒ`°`C`ßÐß°`}`Œ‹€`}` ’ž‡š‹–šŒ`` da@^a dbÐWb dc dd`Kd€Wd}d ’ž”š‰–Œ–“š€d}d›ž‹žÐDdÀ>dd de^e}e ›–Œ“ž†šŒÐe}e˜’œ ›–Œ“ž†‘‘š^e dfð^f dg@^g dh di^ii}i –Œ‰–Œ–“š^i dj}j –Œ‰–Œ–“šj1j dk}kšŒ–…š€kà^kÀk}k ˜š‹Œ–‘™€kPkÀk}k ˜š‹ ˆ–›‹—kÀk}k˜’œ œ’’•—š–˜—‹k dl@^l dm dn}n ‰–Œ’šŒŒž˜šn}nŒ‹€nà^nn°nCnÅß°n}n›ž‹ž do}o ‰–Œ‹–’𖛇o}o œŠ‹–’𖛇 dp}p Œš‘›‹™‘‹€pà^pp dq}qšš‘›š€qà^qq drÐWr ds dt`Kt€Wt}t ’ž”𖑉–Œ–“š€tt du}u –Œ‰–Œ–“šuAu dv}všŒ–…š€và^vÀvvÀvvv dwÐWw dx dy`Ky€Wy}y‹–’š‹–œ”€yy dzÀWz}z ’Œ˜ ‹–’š‹–œ” d{ d|}| œŠ‹–’𖛇|}| œŠ‹–’𖛇°|| d}^}}}žˆž–‹–‘˜šŒ‘Œš^} d~^~}~ œ’’’š‹—›à~}~˜’œ š‹—š‘š‹‹œ^~ d^} œŠ‹–’𖛇ð}š‘›–‘˜”‹‹–’𖛇°} ‹–’šŠ‹œŠ‘‹Œ^ d€}€ š‹ž‘Œ’–‹€€C€­šŒ‘Œšß«–’šŠ‹€ d@^ d‚@^‚ dƒ@^ƒ d„ d…^…}… –Œ‰–Œ–“š^… d†^†}† œŠ‹–’𖛇ð†}† ‰–Œ‹–’𖛇°†}†˜’œ ‰–Œ‹–’šŠ‹^† d‡}‡ ’ž”𖑉–Œ–“š€‡‡ dˆ@^ˆ d‰@^‰ dŠÐWŠ d‹ dŒ`KŒ€WŒ}Œ›žˆ€ŒŒ dÀW}’Œ˜ ›žˆ dŽ d} Œš‹™˜œ“€}˜ š› d} Œš‹˜œ“€} ˜ †š““ˆ d‘ d’}’  ‹š‡‹šœ‹€’’À’}’ ˜š‹Œ–‘™€’à^’À’}’˜š‹ †’À’}’ ˜š‹Œ–‘™€’P’À’}’ ˜š‹ ˆ–›‹—’À’}’˜’œ œ’’•—š–˜—‹À’}’ ‰–Œ’šŒŒž˜šÀ’P’À’}’ —ž œš‘‹šÀ’}’ ‰ž œš‘‹š’ d“ÐW“ d” d•`K•€W•}•žŒš™Š‘Œ“–œ–‹š›’šŒŒž˜šŒ€•}•›ž‹ž°•ЕÐD• >•• d– d— d˜ d™ dšÀDš}š–Àš}š’ž‡ÐDš€>š d›ÀD›}›“›ŒÐD›€>› dœÀDœ}œŒ‹ž‹šÀœ}œ“›Œ‹ž‹šÐDœ°>œ d dž}ž’ž‡Ðž}ž“š‘€ž}ž›ž‹žžÐžž dŸ d P^ } –Р  W } ’ž‡ d¡}¡Œ‹ž‹š¡€¡€¡}¡›ž‹ž°¡}¡–С`¡ >¡€¡!¡€¡¡à¡¡¡ d¢^¢}¢Œ‹ž‹šà¢}¢“›Œ‹ž‹š^¢ d£^£}£“›Œ‹ž‹š^£ d€}€ž››Š‘Œ“–œ–‹š›€€}€’–›€€}€›ž‹žÀ€}€“›ŒÀ€}€–Ѐ}€“›Œ€À€}€–Ѐ}€“›ŒÐ€€€ d¥0^¥ dŠ}Šœ’Š™Š}Šœ’Š™°Š}Š’–›€Š}Š›ž‹žÀŠ}А“›ŒÀŠ}Š–ÐŠ}А“›ŒŠ d§@^§ dš}𐓛Œ‹ž‹šš}šŒ‹ž‹š d©}©“›Œ©}©– dª@^ª d«`^« d¬ d­ d®^®}®Œ‹ž‹š^® d¯}¯ž››Š‘Œ“–œ–‹š›€¯}¯’–›€¯}¯›ž‹žÀ¯}¯“›ŒÀ¯}¯–Я}¯“›Œ¯À¯}¯–Я}¯“›ŒÐ¯¯¯ d°0^° d±}±œ’Š™±}±œ’Š™°±}±’–›€±}±›ž‹žÀ±}±“›ŒÀ±}±–б}±“›Œ± d²@^² d³ÐW³ dŽ dµ`Kµ€Wµ}µž››Š‘Œ“–œ–‹š›€µ}µ›ž‹ž°µÐµÐDµ >µÀµ}µ“š‘˜ÐDµ€>µµ d¶ÀD¶}¶–ÐD¶€>¶ d·ÀD·}·ÎÀ·}·ÍÀ·}·“›ŒÐD·P?· dž d¹P^¹}¹–й¹ W¹}¹“š‘˜ dº}º›ž‹ž°º}º–кº}º›ž‹ž°º}º–к`º >º€º!ºº d»`^» dŒ}ŒŠ‘Œ“–œ–‹š›’šŒŒž˜ššœš–‰š›€Œ}Œ›ž‹žŒ dœÐWœ dŸ d¿ dÀ dÁ d dà dÄ dÅ dÆ dÇ€WÇ}ÇŠ‘Œ“–œ–‹š›’šŒŒž˜ššœš–‰š›€Ç}Ç’Œ˜ÐDÇÀ>ÇÇ dÈð^È dÉÐWÉ dÊ dË`KËÀDË}Ë ŒŠŒš‘›š›ÀË}Ëžˆž–‹–‘˜ŒŠŒš‘ŒšÐD˰>Ë dÌ`KÌÀDÌ}Ì ŒŠŒš‘›‘‹–™†ÐDÌà>Ì dÍ`KÍÀDÍ}ÍŒŠŒš‘›‘‹–™†ž’ÐDÍ€>Í dÎ dÏ dÐ dÑ dÒeÒÀDÒ}Ò ŒŠŒš‘›š›šœ‰°ÒÐÒÐDÒ >Ò dÓ dÔ dÕ dÖ d× dØ dÙ dÚ dÛ dÜ dÝ dÞ dß dà dá€Wá}ጊŒš‘›œ’’Š‘–œž‹–‘Œ€á}ᑐ‹–™†ÐDáà>áÀá}Ꮮ’ÐDá€>áá°Wá°>á dâ^â€â}â š‘š‹Œ‹ž‹šàâ}â ˜’œ Œš–ž“â`â€â}â š‘š‹Œ‹ž‹šàâ}☒œ š‘š‹â^â dãð^ãAã dä@^ä då}å ŒŠŒš‘›š›å1å dæ}枈ž–‹–‘˜ŒŠŒš‘Œšæ1æ dç}ç ŒŠŒš‘›‘‹–™†ç}瑐‹–™† dè}茊Œš‘›‘‹–™†ž’è}菞’ dé}鋍ž‘Œ’–‹Œ‹šž’€éé dêð^ê1ê dëÐWë dì dí dî dï dð dñ€Wñ}ñšŒŠ’šœ’’Š‘–œž‹–‘Œ€ññ dò}ò ŒŠŒš‘›š›òAò dó}󞈞–‹–‘˜ŒŠŒš‘ŒšóAó dô}ô ŒŠŒš‘›‘‹–™†ô}ôš’‹† dõ}õŒŠŒš‘›‘‹–™†ž’õõ dö}ö‹ž‘Œ’–‹Œ‹šž’€öö d÷ÐW÷ dø dù dú dû dü dý€Wý}ý –ŒŒŠŒš‘›š›€ýý°Wý°>ý dþð^þ€þ}þ ŒŠŒš‘›š›þ`þ€þþ}þžˆž–‹–‘˜ŒŠŒš‘Œšþ dÿÐWÿ d d d d d d d d d€W}ŒŠŒš‘›‹ž‘Œ’–‹€}›ž‹ž°ÐÐD >°W°> d ^ €  }  ŒŠŒš‘›š› À € } žˆž–‹–‘˜ŒŠŒš‘Œš ^  d ð^ A  d @^  d  d ^ € }  š‘š‹Œ‹ž‹šà }  ˜’œ Œš–ž“ ` € }  š‘š‹Œ‹ž‹šà } ˜’œ š‘š‹ ^  dð^A d@^ d d}‹ž‘Œ’–‹€}‹—š‹À}›ž‹žÀA d dð^1 dÐW dPK d d d d d d d d d d d  d! d" d# d$ d% d& d' d( d) d* d+ d, d- d. d/ d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d9 d: d;°d; dim GMC_DefaultCommObj as objref GalilCommunication #undoc func GMC_SetCommObjPos func GMC_SetCommObjPos (obj as objref) endfunc #undoc func GMC_VerifyCommObj func GMC_VerifyCommObj (commObject as reference to objref GalilCommunication) endfunc #undoc func GMC_GetLocalPort func GMC_GetLocalPort() returns unibyte endfunc #undoc func GMC_CountCommands func GMC_CountCommands(stream[] as byte) returns integer endfunc #undoc func GMCDataTypeToCommand func GMCDataTypeToCommand(dt as GMC_DataType, axis as GMC_Axis, useCustom as boolean, -> custom as string) returns string endfunc #undoc func GMC_ClearException func GMC_ClearException() endfunc Define Area Object type GalilCommunication #doc object GalilCommunication ~This object forms the core of the Galil library. This object controls ~all interaction between the motion controller and the QTERM-G70. It is ~capable of communicating with a motion controller either serially or via ~ethernet. To communicate with a motion controller, create an instance of ~this object and set up its properties as appropriate. Then create other ~GMC objects and set thier commObject property to refer to this object. ~You can communicate with multiple motion controllers by creating one ~GalilCommunication object per controller. There is a limit of one controller ~per serial port on the G70 and a limit of 8 ethernet controllers that can be ~used at once. #doc prop CommMethod ~The value of this property determines how this object will attempt communication ~with the controller. You can select between Serial, TCP/IP, UDP/IP or no ~communication. If you attempt to change communication methods while this object is ~attempting to open an ethernet channel to the controller, an error is generated and ~no change in communication is made. In general, you should set this property ~when designing your workspace and not change it at runtime on the terminal. dim CommMethod as GMC_CommMethod func CommMethod (newVal as GMC_CommMethod) endfunc #doc prop IPAddress ~This property defines the IP address of the motion controller. If communicating via ethernet ~set this property to be the IP address of the motion controller. Use the industry standard ~dotted string format (i.e. "192.168.1.1") to specify the address. This property is ignored if ~CommMethod is not set to either GMC_EthernetUDP or GMC_EthernetTCP. dim IPAddress as string func IPAddress (newVal as string) endfunc #doc prop serialPort ~This property determines which serial port on the QTERM-G70 is used for communication with ~the motion controller. Set it to the G70 serial port to which the controller is attached. ~This property is ignored if CommMethod is anything except GMC_UseSerial. dim SerialPort as comm func SerialPort (newVal as comm) endfunc #doc prop serialFormat ~This property determines the serial format that is used for communication with the motion ~controller. Select the format that the motion controller is using to ensure proper communcation. ~This property is ignored if UseEthernet is anything except GMC_UseSerial. dim SerialFormat as GMC_SerialFormat func SerialFormat (newVal as GMC_SerialFormat) endfunc #doc prop maxRetries ~If the motion controller fails to respond to a command, the communications object can attempt ~to retry the command. Generally the motion controller will only fail to respond if it ~is extremely busy or there is a communications problem. As many commands tell the controller ~to perform some action and can cause problems if they are resent, the default number of retries ~is zero. You may increase the number of retries if your application only uses query commands. ~

Note: This property only applies if you are using GMC_UseSerial or GMC_EthernetUDP ~as your communication method. This property is ignored for TCP communication as the ~TCP/IP protocol automatically retries. dim MaxRetries as integer #doc prop timeout ~timeout defines how long (in milliseconds) this object will wait for a response from ~the controller before it decides that there has been a communications failure. If the ~timeout elapses without receiving a response from the terminal, then the data is considered ~lost and is retried if maxRetries is non-zero. ~

Note: This property only applies if you are using GMC_UseSerial or GMC_EthernetUDP ~as you communication method. This property is ignored for TCP communication as the ~TCP/IP protocol automatically deals with timeout issues. dim timeout as integer func timeout (newVal as integer) endfunc #doc prop displayErrors ~This property determines how, if at all, errors are displayed when they occur. Errors are ~displayed in a small yellow bar near the top of the display. The ~following options are available:

~
GMC_DisplayNone
No errors are displayed. This object will never display an error ~message. ~
GMC_DisplayCommErrors
Errors in communication are displayed. This includes ~communication timeouts and unexpected TCP disconnections. ~
GMC_DisplayAllErrors
All errors are displayed. This includes all communication ~errors as well as errors returned by the controller in response to bad commands.
dim displayErrors as GMC_DispErrors #doc prop unsolicitedAware ~This property determines whether this object will watch for unsolicited messages from the ~controller. If this value is true, then all data returned from the controller is examined ~for unsolicited messages (i.e. data returned from the controller that was not requested by ~this terminal. Examples include "MG" commands in the program executing on the controller). ~When unsolicited messages are detected, the UnsolicitedMessageReceived event is ~generated. You can handle this event to examine incomming unsolicited messages.

~If this property is false, then this object does not watch for unsolicited messages. Setting ~this property to false will generally lead to improved performance on the terminal, however, ~if an unsolicited message is sent, then a communications error will occur. Set this property ~to false if you want better performance on the terminal and know that the controller will not ~send unsolicited messages. dim unsolicitedAware as boolean func Startup() handles msg_init endfunc endfunc endfunc endfunc handles MSG_COMM_ACCEPT endfunc handles MSG_COMM_ERROR endfunc endfunc endfunc endfunc endfunc handles MSG_COMM_RECEIVE endfunc #doc prop curResponse ~This property contains the most recent response from the controller. It is guarenteed to be ~valid during a GMC_CommSuccess message. At any other time the value of this property ~may not be valid. It is the responsibility of the object that recieves the GMC_CommSuccess ~to parse the response appropriately endfunc endfunc endfunc #doc func SendAsciiCommandStream ~Use this command to send an arbitrary stream of commands to the controller. When the ~controller has responed, this object will send a GMC_CommSuccess or a GMC_CommFailure ~message to the notifyObj with the notifyCode as the paramater. #param stream: A semicolon separated list of commands to send to a Galil motion controller #param notifyObj:The object that will receive notification once the controller has responeded to the commands #param notifyCode:This value will be sent to the notifyObj in the notification message. It is primarily useful for objects that may poll different values at different times so that it can differenciate to which query it is receiving a response. func SendAsciiCommandStream(stream[] as byte, notifyObj as objref, notifyCode as integer) returns boolean endfunc #doc func SendAsciiCommandStreamCounted ~Use this command to send an arbitrary stream of commands to the controller. When the ~controller has responed, this object will send a GMC_CommSuccess or a GMC_CommFailure ~message to the notifyObj with the notifyCode as the paramater. This function is ~faster than SendAsciiCommandStream. Call this function if you know exactly ~how many commands are in stream. You generally do that by calling the global function ~GMC_CountCommands. #param stream: A semicolon separated list of commands to send to a Galil motion controller #param notifyObj:The object that will receive notification once the controller has responeded to the commands #param notifyCode:This value will be sent to the notifyObj in the notification message. It is primarily useful for objects that may poll different values at different times so that it can differenciate to which query it is receiving a response. #param count:The number of commands in the command stream. This value must correctly identify the number of commands in the stream, or a communications failure will occur. You can obtain the proper value by calling GMC_CountCommands on your stream of commands. func SendAsciiCommandStreamCounted (stream[] as byte, notifyObj as objref, -> notifyCode as integer, count as integer) returns boolean endfunc endfunc endfunc endfunc endfunc handles MSG_TIMETICK endfunc handles MSG_DRAW endfunc endfunc endfunc #doc override UnsolicitedMessageReceived #param msg:This is the text of the unsolicited message. ~This event is called whenever unsolicited messages are received from the controller. The ~msg paramater contains the actual message. Unsolicited messages are NOT parsed ~for content, but rather are given immediately to this funciton. This means that the user ~is responsible for parsing the message. It is possible that two unsolicited messages may ~be passed to this event at once. It is also possible that a single unsolicited message may ~be split in to two calls to this event. func UnsolicitedMessageReceived(msg as string) endfunc #doc prop suspendedRecv ~This property holds the most recent bit of data received by this object once it has been ~suspended. #doc func SuspendCommunications ~This function is intended for internal use by advanced GMC objects. Do not use it, unless ~you are implementing a special object that has special communication needs.

~This function breaks off normal communication with the motion controller. Communication ~requests are queued, until communications are resumed. This function returns true if ~the request has been successfully processed, however, you MUST NOT assume that the ~communications have actually been suspended until the object indicated by the notify ~paramater has received the GMC_SuspendSuccessNotify message.

~Once this object has been suspended, any incomming serial data will be stored in the property ~suspendedRecv and notify will be informed of the data reception via a ~GMC_SuspendCommReceive message. #param notify:Indicates the object that requested the suspension. This object will receive the GMC_SuspendSuccessNotify message once the suspension has taken effect #param parm:This value will be passed to notify as the paramater to the GMC_SuspendSuccessNotify message. func SuspendCommunications(notify as objref, parm as integer) returns boolean endfunc #doc func ResumeCommunications ~This function is intended for internal use by advanced GMC objects. Do not use it, unless ~you are implementing a special object that has special communication needs.

~This function resumes normal communications after the communications had been suspended func ResumeCommunications() endfunc #doc func IsSuspended ~This function is intended for internal use by advanced GMC objects. Do not use it, unless ~you are implementing a special object that has special communication needs.

~This function returns true if communications are currently suspended, false otherwise. func IsSuspended() returns boolean endfunc #doc func SuspendTransmit ~This function is intended for internal use by advanced GMC objects. Do not use it, unless ~you are implementing a special object that has special communication needs.

~This function is used to perform a special transmission when communications are suspended with ~the motion controller. This can only be used when communication is suspended. It will return ~false if communication is not suspended. Otherwise it transmits the data and returns true. #param data:This data will be transmitted to the controller without respect of formatting. As the communications object does not examine this data, it will not expect a response of any sort from the controller. func SuspendTransmit (data[] as byte) returns boolean endfunc Enddef #endfile #ifnot Galil_mc_src_GMCPoll #option Galil_mc_src_GMCPoll Define Area Object type GMCPoll #ToolImage "80013FFC40025FFA58FA577A577A577A587A5FBA5FDA5FFA40023FFC8001" '******************************************************************* 'Object: GMCPoll 'Author: Jeremy Richards 'Date: 27 May 2004 ' 'Description: Galil motion controller polling object ' 'Version: 1.52 'Copyright: 2004 QSI Corporation. Permission to modify and ' distribute this object is granted provided this ' copyright notice remains in tact. '******************************************************************* #doc object GMCPoll ~This object polls the controller with an arbitrary command at regular ~intervals. It then displays the controller's response. It is useful ~for displaying values that will change over time, such as the motor ~position. Many properties are provided which contorol the appearance ~of this object, the polling frequency and what is being polled. ~

Note: To enhance performance, this object will only ~poll the controller when it is visible (enabled). library standard source ToolMessages library galil_mc source GalilCommunications library standard source draw3DRect Library Standard Source TextSingleLineBDF dim enabled as boolean init enabled := true func enabled(newval as boolean) enabled := newval Enable (me, enabled) if enabled then TimeTick() endif endfunc dim parent as objref init parent := default func parent(newval as objref) parent := newval Attach(me, parent) endfunc dim xPos as integer init xPos := 0 func xPos(newval as integer) xPos := newVal Relocate (me, xPos, yPos) endfunc dim yPos as integer init yPos := 0 func yPos(newval as integer) yPos := newval Relocate (me, xPos, yPos) endfunc dim width as integer init width := 25 func width(newval as integer) width := newval Resize (me, width, height) endfunc dim height as integer init height := 25 func height(newval as integer) height := newval Resize (me, width, height) endfunc dim bgColor as color init bgColor := col_183 func bgColor (newVal as color) bgColor := newVal Rerender(me) endfunc dim fgColor as color init fgColor := rgb_black func fgColor (newVal as color) fgColor := newVal Rerender(me) endfunc #doc prop bevelWidth ~This determines the width (in pixels) of the 3D border surrounding the object dim bevelWidth as integer init bevelWidth := 2 func bevelWidth (newVal as integer) bevelWidth := newVal Rerender(me) endfunc #doc prop bevelStyle ~This determines the style of the 3D bevel on this object. Possible values include: ~
GMC_BevelRaised
The bevel will appear to rise out of the background. ~
GMC_BevelSunken
The bevel will appear sunken into the background. ~
GMC_BevelNone
No bevel will be drawn. dim bevelStyle as GMC_BevelStyle init bevelStyle := GMC_BevelSunken func bevelStyle (newVal as GMC_BevelStyle) bevelStyle := newVal Rerender(me) endfunc #doc prop inset ~This determines how close text is allowed to run to the bevel of this object (or the ~edge of the object if the bevel is turned off). This value must always be at least 1. dim inset as integer init inset := 1 func inset (newVal as integer) inset := newVal Rerender(me) endfunc dim font as bdffont init font := default func font(newVal as bdffont) font := newVal Rerender(me) endfunc #doc prop prefix ~The value defined by prefix will be displayed in front of the responses returned ~from the controller. If no prefix is desired, set this property to the empty string (""). dim prefix as string init prefix := "" func prefix (newVal as string) prefix := newVal Rerender(me) endfunc #doc prop suffix ~The value defined by suffix will be displayed following the responses returned ~from the controller. If no suffix is desired, set this property to the empty string (""). dim suffix as string init suffix := "" func suffix (newVal as string) suffix := newVal Rerender(me) endfunc #doc prop commObject ~commObject defines which GalilCommunication object will be used to communicate with ~the controller. You should create one GalilCommunication object for each motion controller ~you wish to communicate with. By setting the commObject property, you can control wich ~motion controller this object communicates with.

Most projects will require only ~one GalilCommunication object, and this property will automatically be set to refer to that ~communication object. dim commObject as objref GalilCommunication init commObject := empty #doc prop command ~command defines the command (or series of commands) to execute on the controller ~when this button is pressed. This property can be set to any valid command, or any ~semicolon delimited series of commands. Refer to the Command Reference Manual for your ~controller for a list of valid commands. dim command as string init command := "TPX" func command (newVal as string) command := newVal commandCount := GMC_CountCommands (command) endfunc private dim commandCount as integer #doc prop pollInterval ~pollInterval defines, in milliseconds, then amount of time that will elapse between ~polls to the controller. The minimum supported value is 40 ms. It is recommended that you ~use the highest possible value for this property as excessive polling will reduce the ~responsiveness of the terminal. Also, you may want to limit the total number of polling ~objects that can be visible (enabled) at once in order to enhance performance.

~In order to maximize performance, if this object, or the screen on which it resides is ~disabled, then it will cease polling. Once the object (or parent screen) is re-enabled, ~it will immediately poll the controller once to refresh its value, then resume normal polling. dim pollInterval as integer init pollInterval := 1000 func pollInterval (newVal as integer) if newVal <= 0 then pollInterval := 0 UnregisterMsgHandler (me, msg_timetick, 0) else pollInterval := newVal RegisterMsghandler (me, msg_timetick, newVal/20) endif endfunc func StartUp() handles MSG_INIT Relocate (me, xPos, yPos) Resize (me, width, height) Enable (me, enabled) Attach (me, parent) Command(command) pollInterval(pollInterval) GMC_VerifyCommObj(commObject) endfunc private dim dispValue as string func Draw() handles MSG_DRAW dim bwi as integer if bevelStyle == GMC_BevelNone then bwi = inset else bwi = bevelWidth + inset endif SetBgColor(bgcolor) SetFgColor(bgcolor) DrawBox (xPos, yPos, xPos+width-1, yPos+height-1) SetFgColor (fgColor) _TextRect (xPos+bwi, yPos+bwi, width-2*bwi, height-2*bwi, prefix+dispvalue+suffix, font, ha_center, va_center) if bevelStyle == gmc_bevelraised then _3dframe (xpos, ypos, xpos+width-1, ypos+height-1, _highlight3dcolors[bgcolor], _shadow3dColors[bgcolor], bevelwidth) elseif bevelStyle == gmc_bevelsunken then _3dframe (xpos, ypos, xpos+width-1, ypos+height-1, _shadow3dColors[bgcolor], _highlight3dColors[bgcolor], bevelwidth) endif endfunc private func Timetick () handles MSG_TIMETICK commObject.SendAsciiCommandStreamCounted(command, me, 0, commandCount) return endfunc private func Zenabled (status as boolean) handles MSG_ZENABLED if status and enabled then TimeTick() endif endfunc private func Success(parm as integer) returns boolean handles GMC_CommSuccess dispValue := trim(commObject.curResponse) ResponseReceived(dispValue) Rerender(me) return true endfunc private func Failure(parm as integer) returns boolean handles GMC_CommFailure dispValue := trim(commObject.curResponse) FailureReceived(dispValue, commObject.CurFailureReason) return true endfunc #doc override ResponseReceived #param response:The data returned from the controller. You may modify this paramater for formatting reasons. Any changes to this paramater will be reflected in the final display. ~This event called whenever this object receives receives a response from the controller as a ~result of a poll. The paramater response contains the string that was returned from ~the controller. You may modify response in order to change the final string which ~will be displayed in this object. func ResponseReceived (response as reference to string) return endfunc #doc override FailureReceived #param response:The response returned by the controller minus the final colon terminator. If you modify this paramater, the final display will reflect the results of the modifications #param failReason:The reason why this event is generated. Either GMC_FailCommunications or GMC_FailBadCommand ~This event is triggered when a command has been sent to the controller, but the controller ~failed to respond, responded incorrectly, or returned an error response. func FailureReceived(response as reference to string, failReason as GMC_FailureReason) return endfunc 'The rest of these functions add functionality to the PC development tool. The '#if _TOOL line ensures that the code will not be compiled into a BFF that 'is loaded into the terminal 'These functions are called in response to actions taken in the PC development tool. 'If as a result of these actions you change one or more of the properties of 'this object that should be permanently recorded (for instance changing xPos in 'response to MSG_TOOL_MOVE) then you should call Tool_Persist to save the new 'value of the property in your source code of your object instance #if _TOOL 'This function is called by the PC development tool, when you change the attachment 'of an object (i.e. in response to dragging it around the object tree). 'Note: the purpose of this function is to allow you to attach to another 'container, you should not change your parent property or call Tool_Persist 'until you receive a MSG_TOOL_ATTACHED. A MSG_TOOL_ATTACHED will be sent 'in response to an Attach API function call. func ToolAttach (attachTo as objref) handles MSG_TOOL_ATTACH Attach (me, attachTo) endfunc 'This function is called in response to calling Attach (primarily in a 'handler for MSG_TOOL_ATTACH, but possibly in other places as well_. func ToolAttached (newParent as objref) handles MSG_TOOL_ATTACHED 'Set our parent property to reflect who we are attached to and save parent := newParent Tool_Persist (parent) 'Save parent endfunc 'This function is called when the user drags an object instance with the 'mouse in the PC development tool. dx and dy are relative offsets from the current 'location of the object func ToolMove (dx as integer, dy as integer) handles MSG_TOOL_MOVE xPos := xPos + dx yPos := yPos + dy Relocate (me, xPos, yPos) 'Save the changes we just made Tool_Persist (xPos) Tool_Persist (yPos) endfunc 'This function is called by the PC development tool to obtain the coordinates of 'the resize grips. The arrays xCoords, yCoords, and cursors all contain 0 'elements initially. This means that you should either call redim on those 'arrays and set their values, or declare local arrays, set the values of 'the local arrays, and then assign xCoords, yCoords and cursors to those 'local arrays. Closed indicates whether the Foundry should connect the 'first and last grips to make a closed object. xCoords, yCoords, and 'cursors should all contain the same number of elements when this function 'completes func ToolGetHandles (xCoords[] as reference to integer, -> yCoords[] as reference to integer, -> cursors[] as reference to GuiCursors, -> closed as reference to boolean) handles MSG_TOOL_GETHANDLES 'Call a standard function to handle common functionality. 'You can omit this function call and implement your own custom functionality 'if desired _ToolGetHandles (xCoords, yCoords, cursors, closed, xPos, yPos, width, height) endfunc 'This function is called in response to a user moving a resize grip within 'the PC development tool. handleNum is the index into the arrays that were returned 'by the handler for MSG_TOOL_GETHANDLES. You should return true from this 'function func ToolMoveHandle (handleNum as reference to integer, dx as integer, dy as integer) handles MSG_TOOL_MOVEHANDLE 'Call a standard function to handle common functionality. 'You can omit this function call and implement your own custom functionality 'if desired _ToolMoveHandle (handleNum, dx, dy, xPos, yPos, width, height, me) endfunc 'This function is called when the user created an instance of this template by 'selecting it from the object palette and dragging it in the layout view. 'The handler for MSG_INIT is not called automatically, and if you want it 'called, you should call it manually. 'You should call Tool_Persist on all the properties that you set up in this 'message handler. (x1, y1) are the coordinates that the user started his 'drag and (x2, y2) are the coordinates that the mouse was released func ToolDragCreate (parentObj as objref, x1 as integer, y1 as integer, -> x2 as integer, y2 as integer) handles MSG_TOOL_DRAGCREATE 'Call a standard function to handle common functionality. 'You can omit this function call and implement your own custom functionality 'if desired _ToolDragCreate (parentObj, x1, y1, x2, y2, xPos, yPos, width, height, parent) commObject := GMC_DefaultCommObj tool_persist(commObject) 'Call our MSG_INIT handler StartUp() endfunc #endif Enddef #endif #endfile Te˜ž“–“ ’œ Œœ ˜’œ““ dtd˜ž“–“ ’œ Œœ ˜’œ““ dKK K@K}˜’œ““ d@dC<ÇÏÏÎ̹¹ŒËÏÏÍʹ¹ŸÊǹŸÊÈÈŸÊÈÈŸÊÈÈŸÊÇȟʹœŸÊ¹»ŸÊ¹¹ŸËÏÏÍ̹¹ŒÇÏÏÎ d d d d d d d d d d d d d d d d d d d d d d dÀd}Œ‹ž‘›ž›Ðd} ‹“’šŒŒž˜šŒ dÀd}˜ž“–“ ’œÐd}˜ž“–“œ’’Š‘–œž‹–‘Œ dÀd}Œ‹ž‘›ž›Ðd} ›žˆÌ›šœ‹ dÀd}Œ‹ž‘›ž›Ðd}‹š‡‹Œ–‘˜“š“–‘š›™ d dÀD}š‘ž“š›ÐD°> d ðD } š‘ž“š› 1  d!€W!}!š‘ž“š›€!}!‘šˆ‰ž“ÐD!°>!! d"}"š‘ž“š›"}"‘šˆ‰ž“ d#}#š‘ž“š€#à^#À#}#š‘ž“š›# d$ d%^%}%š‘ž“š›^% d&}&‹–’š‹–œ”€&& d'@^' d(ÐW( d) d*ÀD*}*žš‘‹ÐD*à>* d+ðD+}+žš‘‹+P+ d,€W,},žš‘‹€,},‘šˆ‰ž“ÐD,à>,, d-}-žš‘‹-}-‘šˆ‰ž“ d.}.ž‹‹žœ—€.à^.À.}.žš‘‹. d/ÐW/ d0 d1ÀD1}1‡ŒÐD1€>1 d2ðD2}2‡Œ22 d3€W3}3‡Œ€3}3‘šˆ‰ž“ÐD3€>33 d4}4‡Œ4}4‘šˆ‰ž“ d5}5š“œž‹š€5à^5À5}5‡ŒÀ5}5†Œ5 d6ÐW6 d7 d8ÀD8}8†ŒÐD8€>8 d9ðD9}9†Œ99 d:€W:}:†Œ€:}:‘šˆ‰ž“ÐD:€>:: d;};†Œ;};‘šˆ‰ž“ d<}<š“œž‹š€<à^<À<}<‡ŒÀ<}<†Œ< d=ÐW= d> d?ÀD?}?ˆ–›‹—ÐD?€>? d@ðD@}@ˆ–›‹—@@ dA€WA}Aˆ–›‹—€A}A‘šˆ‰ž“ÐDA€>AA dB}Bˆ–›‹—B}B‘šˆ‰ž“ dC}CšŒ–…š€Cà^CÀC}Cˆ–›‹—ÀC}C—š–˜—‹C dDÐWD dE dFÀDF}F—š–˜—‹ÐDF€>F dGðDG}G—š–˜—‹GG dH€WH}H—š–˜—‹€H}H‘šˆ‰ž“ÐDH€>HH dI}I—š–˜—‹I}I‘šˆ‰ž“ dJ}JšŒ–…š€Jà^JÀJ}Jˆ–›‹—ÀJ}J—š–˜—‹J dKÐWK dL dMÀDM}M˜œ“ÐDMð>M dNðDN}N˜œ“N}Nœ“ ÎÇÌ dO€WO}O˜œ“€O}O‘šˆ‰ž“ÐDOð>OO dP}P˜œ“P}P‘šˆ‰ž“ dQ}Qšš‘›š€Qà^QQ dRÐWR dS dTÀDT}T™˜œ“ÐDTð>T dUðDU}U™˜œ“U}U ˜ “žœ” dV€WV}V™˜œ“€V}V‘šˆ‰ž“ÐDVð>VV dW}W™˜œ“W}W‘šˆ‰ž“ dX}Xšš‘›š€Xà^XX dYÐWY dZ d[ d\ d]ÀD]}] š‰š“ˆ–›‹—ÐD]€>] d^ðD^}^ š‰š“ˆ–›‹—^^ d_€W_}_ š‰š“ˆ–›‹—€_}_‘šˆ‰ž“ÐD_€>__ d`}` š‰š“ˆ–›‹—`}`‘šˆ‰ž“ da}ašš‘›š€aà^aa dbÐWb dc dd de df dg dh diÀDi}i š‰š“Œ‹†“šÐDi}i˜’œ š‰š“Œ‹†“š djðDj}j š‰š“Œ‹†“šj}j˜’œ š‰š“ŒŠ‘”š‘ dk€Wk}k š‰š“Œ‹†“š€k}k‘šˆ‰ž“ÐDk}k˜’œ š‰š“Œ‹†“šk dl}l š‰š“Œ‹†“šl}l‘šˆ‰ž“ dm}mšš‘›š€mà^mm dnÐWn do dp dq dr dsÀDs}s–‘Œš‹ÐDs€>s dtðDt}t–‘Œš‹tt du€Wu}u–‘Œš‹€u}u‘šˆ‰ž“ÐDu€>uu dv}v–‘Œš‹v}v‘šˆ‰ž“ dw}wšš‘›š€wà^ww dxÐWx dy dzÀDz}z™‘‹ÐDz?z d{ðD{}{™‘‹{P{ d|€W|}|™‘‹€|}|‘šˆ‰ž“ÐD|?|| d}}}™‘‹}}}‘šˆ‰ž“ d~}~šš‘›š€~à^~~ dÐW d€ d d‚ dƒ d„ÀD„}„š™–‡ÐD„À>„ d…ðD…}…š™–‡…C… d†€W†}†š™–‡€†}†‘šˆ‰ž“ÐD†À>†† d‡}‡š™–‡‡}‡‘šˆ‰ž“ dˆ}ˆšš‘›š€ˆà^ˆˆ d‰ÐW‰ dŠ d‹ dŒ d dŽÀDŽ}ŽŒŠ™™–‡ÐDŽÀ>Ž dðD}ŒŠ™™–‡C d€W}ŒŠ™™–‡€}‘šˆ‰ž“ÐDÀ> d‘}‘ŒŠ™™–‡‘}‘‘šˆ‰ž“ d’}’šš‘›š€’à^’’ d“ÐW“ d” d• d– d— d˜ d™ dš d› dœÀDœ}œ œ’’•šœ‹ÐDœà>œ}œ˜ž“–“œ’’Š‘–œž‹–‘ dðD} œ’’•šœ‹}š’‹† dž dŸ d  d¡ d¢ d£ d€ÀD€}€œ’’ž‘›ÐD€À>€ d¥ðD¥}¥œ’’ž‘›¥C¥«¯§ dŠ€WŠ}Šœ’’ž‘›€Š}Š‘šˆ‰ž“ÐDŠÀ>АŠ d§}§œ’’ž‘›§}§‘šˆ‰ž“ dš}𠜐’’ž‘›œŠ‘‹š}š˜’œ œŠ‘‹œ’’ž‘›Œ€š}šœ’’ž‘›š d©ÐW© dª`KªÀDª}ª œ’’ž‘›œŠ‘‹ÐDª€>ª d« d¬ d­ d® d¯ d° d± d² d³ dŽ dµÀDµ}µ ““–‘‹š‰ž“ÐDµ€>µ d¶ðD¶}¶ ““–‘‹š‰ž“¶¶è d·€W·}· ““–‘‹š‰ž“€·}·‘šˆ‰ž“ÐD·€>·· dž^ž}ž‘šˆ‰ž“žž^ž d¹}¹ ““–‘‹š‰ž“¹¹ dº}ºŠ‘š˜–Œ‹š’Œ˜—ž‘›“š€ºà^ºÀº}º ’Œ˜ ‹–’š‹–œ”Àººº d»0^» dŒ}Œ ““–‘‹š‰ž“Œ}Œ‘šˆ‰ž“ dœ}œš˜–Œ‹š’Œ˜—ž‘›“š€œà^œÀœ}œ ’Œ˜ ‹–’š‹–œ”Àœ}œ‘šˆ‰ž“𜜐œ dŸ@^Ÿ d¿ÐW¿ dÀ dÁ€WÁ}ÁŒ‹ž‹Š€ÁÁ dÂÀWÂ}Â’Œ˜ –‘–‹ dÃ}Ãš“œž‹š€Ãà^ÃÀÃ}ǏŒÀÃ}ƏŒà dÄ}ÄšŒ–…š€Äà^ÄÀÄ}Ĉ–›‹—ÀÄ}Ä—š–˜—‹Ä dÅ}Åš‘ž“š€Åà^ÅÀÅ}Åš‘ž“š›Å dÆ}Æž‹‹žœ—€Æà^ÆÀÆ}Əžš‘‹Æ dÇ}Çœ’’ž‘›€Ç}Çœ’’ž‘›Ç dÈ dÉ}É ““–‘‹š‰ž“€É}É ““–‘‹š‰ž“É dÊ}ʘ’œ ‰š–™†œ’’•€Ê}Ê œ’’•šœ‹Ê dËÐWË dÌ dÍ`KÍÀDÍ}Í ›–Œ‰ž“ŠšÐDÍÀ>Í d΀WÎ}ˍžˆ€ΐÎ dÏÀWÏ}Ï’Œ˜ ›žˆ dÐ dÑÀDÑ}ѝˆ–ÐDр>Ñ dÒ^Ò}Ò š‰š“Œ‹†“šÐÒ}Ò ˜’œ š‰š“‘‘š^Ò dÓ}ӝˆ–ÐÓ}Ó–‘Œš‹ dÔ0^Ô dÕ}՝ˆ–ÐÕ}Õ š‰š“ˆ–›‹—°Õ}Õ–‘Œš‹ dÖ@^Ö d× dØ}Ø Œš‹˜œ“€Ø}؝˜œ“Ø dÙ}Ù Œš‹™˜œ“€Ù}ٝ˜œ“Ù dÚ}Ú›žˆ‡€Ú}Ú‡ŒÀÚ}Ú†ŒÀÚ}Ú‡Œ°Ú}Úˆ–›‹—ÐÚÚÀÚ}Ú†Œ°Ú}Ú—š–˜—‹ÐÚÚÚ dÛ dÜ}Ü Œš‹™˜œ“€Ü}Ü™˜œ“Ü dÝ}Ý  ‹š‡‹šœ‹€Ý}݇Œ°Ý}ݝˆ–ÀÝ}݆Œ°Ý}ݝˆ–ÀÝ}݈–›‹—ÐÝÝ Ý}ݝˆ–ÀÝ}Ý—š–˜—‹ÐÝÝ Ý}ݝˆ–ÀÝ}ݏš™–‡°Ý}Ý ›–Œ‰ž“Šš°Ý}ÝŒŠ™™–‡ÀÝ}Ý™‘‹ÀÝ}Ý —ž œš‘‹šÀÝ}Ý ‰ž œš‘‹šÝ dÞ dß^ß}ß š‰š“Œ‹†“šÐß}ߘ’œ š‰š“ž–Œš›^ß dà}à Ì›™ž’š€à}à‡ŒÀà}à†ŒÀà}à‡Œ°à}àˆ–›‹—ÐààÀà}à†Œ°à}à—š–˜—‹ÐààÀà}à —–˜—“–˜—‹Ì›œ“Œ°à}à˜œ“ÐàÀà}à Œ—ž›ˆÌ›œ“Œ°à}à˜œ“ÐàÀà}à š‰š“ˆ–›‹—à dá ^á}á š‰š“Œ‹†“šÐá}ᘒœ š‰š“ŒŠ‘”š‘^á dâ}â Ì›™ž’š€â}⇏ŒÀâ}↏ŒÀâ}⇏Œ°â}∖›‹—ÐââÀâ}↏Œ°â}â—š–˜—‹ÐââÀâ}â Œ—ž›ˆÌ›œ“Œ°â}❘œ“ÐâÀâ}â —–˜—“–˜—‹Ì›œ“Œ°â}❘œ“ÐâÀâ}⠝š‰š“ˆ–›‹—â dã@^ã däÐWä då dæ`Kæ€Wæ}æ‹–’š‹–œ”€ææ dçÀWç}ç ’Œ˜ ‹–’š‹–œ” dè dé}é œ’’•šœ‹àé}錚‘›žŒœ––œ’’ž‘›Œ‹šž’œŠ‘‹š›€é}霐’’ž‘›Àéà^éÀééÀé}é œ’’ž‘›œŠ‘‹é dêð^ê dëÐWë dì dí`Kí€Wí}í…š‘ž“š›€í}팋ž‹ŠŒÐDí°>íí dîÀWî}î ’Œ˜ …š‘ž“š› dï dð^ð}ðŒ‹ž‹ŠŒ`ð}𚑞“š›^ð dñ}ñ‹–’š‹–œ”€ññ dò@^ò dóÐWó dô dõ`Kõ€Wõ}õŒŠœœšŒŒ€õ}õž’ÐDõ€>õõ°Wõ°>õ döÀWö}ö˜’œ œ’’ŒŠœœšŒŒ d÷ dø}ø ›–Œ‰ž“Ššø}ø‹–’€ø}ø œ’’•šœ‹àø}ø œŠšŒ‘Œšø dù}ùšŒ‘Œššœš–‰š›€ù}ù ›–Œ‰ž“Ššù dú}úšš‘›š€úà^úú dûð^û1û düÐWü dý dþ`Kþ€Wþ}þ™ž–“Šš€þ}þž’ÐDþ€>þþ°Wþ°>þ dÿÀWÿ}ÿ˜’œ œ’’™ž–“Šš d d} ›–Œ‰ž“Šš}‹–’€} œ’’•šœ‹à} œŠšŒ‘Œš d}™ž–“Šššœš–‰š›€} ›–Œ‰ž“ŠšÀ} œ’’•šœ‹à}œŠ™ž–“ŠššžŒ‘ dð^1 dÐW d d d d d  d  d  d €W } šŒ‘Œššœš–‰š›€ } šŒ‘ŒšÐD W  W À>   d ð^  dÐW d d d d d d d€W}™ž–“Šššœš–‰š›€}šŒ‘ŒšÐDW WÀ>À} ™ž–“šžŒ‘ÐD}˜’œ ™ž–“ŠššžŒ‘ dð^ dÐW d d d d d d d d d  d! d" d# d$„d$ ‹“ d% d& d' d( d) d* d+€W+}+ ‹“ž‹‹žœ—€+}+ž‹‹žœ—‹ÐD+à>++ d,ÀW,},’Œ˜ ‹“ ž‹‹žœ— d- d.}.ž‹‹žœ—€.à^.À.}.ž‹‹žœ—‹. d/ÐW/ d0 d1 d2 d3€W3}3 ‹“ž‹‹žœ—š›€3}3 ‘šˆžš‘‹ÐD3à>33 d4ÀW4}4’Œ˜ ‹“ ž‹‹žœ—š› d5 d6 d7}7žš‘‹7}7 ‘šˆžš‘‹ d8}8 ‹“ šŒ–Œ‹€8}8žš‘‹8 d9ÐW9 d: d; d< d= d>€W>}>‹“’‰š€>}>›‡ÐD>€>>À>}>›†ÐD>€>>> d?ÀW?}? ’Œ˜ ‹“ ’‰š d@ dA}A‡ŒA}A‡Œ°A}A›‡ dB}B†ŒB}B†Œ°B}B›† dC}Cš“œž‹š€Cà^CÀC}C‡ŒÀC}C†ŒC dD dE dF}F ‹“ šŒ–Œ‹€F}F‡ŒF dG}G ‹“ šŒ–Œ‹€G}G†ŒG dHÐWH dI dJ dK dL dM dN dO dP dQ dR dS€WS}S‹“˜š‹—ž‘›“šŒ€S}S‡œ›Œ°SÐSÐDSWS WS€>SÀS}T†œ›Œ°TÐTÐDTWT WT€>TÀT}UœŠŒŒ°UÐUÐDUWU WU}U ˜Š–œŠŒŒÀU}Vœ“Œš›ÐDVWV WV°>VV dWÀWW}W’Œ˜ ‹“ ˜š‹—ž‘›“šŒ dX dY dZ d[ d\}\ ‹“˜š‹—ž‘›“šŒ€\}\‡œ›ŒÀ\}\†œ›ŒÀ\}\œŠŒŒÀ\}\œ“Œš›À\}\‡ŒÀ\}\†ŒÀ\}\ˆ–›‹—À\}\—š–˜—‹\ d]ÐW] d^ d_ d` da db dc€Wc}c‹“’‰š—ž‘›“š€c}c —ž‘›“š‘Š’ÐDcWc Wc€>cÀc}c›‡ÐDc€>cÀc}c›†ÐDc€>cc ddÀWd}d’Œ˜ ‹“ ’‰š—ž‘›“š de df dg dh di}i ‹“’‰š—ž‘›“š€i}i —ž‘›“š‘Š’Ài}i›‡Ài}i›†Ài}i‡ŒÀi}i†ŒÀi}iˆ–›‹—Ài}i—š–˜—‹Àià^ii dj dkÐWk dl dm dn do dp dq dr ds dt€Wt}t‹“›ž˜œšž‹š€t}t žš‘‹•ÐDtà>tÀt}t‡ÎÐDt€>tÀt}t†ÎÐDt€>tÀt}u‡ÍÐDu€>uÀu}u†ÍÐDu€>uu dvÀWv}v’Œ˜ ‹“ ›ž˜œšž‹š dw dx dy dz d{}{ ‹“›ž˜œšž‹š€{}{ žš‘‹•À{}{‡ÎÀ{}{†ÎÀ{}{‡ÍÀ{}{†ÍÀ{}{‡ŒÀ{}{†ŒÀ{}{ˆ–›‹—À{}{—š–˜—‹À{}{žš‘‹{ d| d}}} œ’’•šœ‹}}}˜’œ ›š™žŠ“‹œ’’• d~}~ ‹“ šŒ–Œ‹€~}~ œ’’•šœ‹~ d d€ d}Œ‹ž‹Š€ d‚ÐW‚ dƒ d„ d„ d…PK… d† d‡ dˆ d‰ dŠ d‹ dŒ dŒ d dްdŽ Define Area Object type GMCPoll #doc object GMCPoll ~This object polls the controller with an arbitrary command at regular ~intervals. It then displays the controller's response. It is useful ~for displaying values that will change over time, such as the motor ~position. Many properties are provided which contorol the appearance ~of this object, the polling frequency and what is being polled. ~

Note: To enhance performance, this object will only ~poll the controller when it is visible (enabled). dim enabled as boolean func enabled(newval as boolean) endfunc dim parent as objref func parent(newval as objref) endfunc dim xPos as integer func xPos(newval as integer) endfunc dim yPos as integer func yPos(newval as integer) endfunc dim width as integer func width(newval as integer) endfunc dim height as integer func height(newval as integer) endfunc dim bgColor as color func bgColor (newVal as color) endfunc dim fgColor as color func fgColor (newVal as color) endfunc #doc prop bevelWidth ~This determines the width (in pixels) of the 3D border surrounding the object dim bevelWidth as integer func bevelWidth (newVal as integer) endfunc #doc prop bevelStyle ~This determines the style of the 3D bevel on this object. Possible values include: ~
GMC_BevelRaised
The bevel will appear to rise out of the background. ~
GMC_BevelSunken
The bevel will appear sunken into the background. ~
GMC_BevelNone
No bevel will be drawn. dim bevelStyle as GMC_BevelStyle func bevelStyle (newVal as GMC_BevelStyle) endfunc #doc prop inset ~This determines how close text is allowed to run to the bevel of this object (or the ~edge of the object if the bevel is turned off). This value must always be at least 1. dim inset as integer func inset (newVal as integer) endfunc dim font as bdffont func font(newVal as bdffont) endfunc #doc prop prefix ~The value defined by prefix will be displayed in front of the responses returned ~from the controller. If no prefix is desired, set this property to the empty string (""). dim prefix as string func prefix (newVal as string) endfunc #doc prop suffix ~The value defined by suffix will be displayed following the responses returned ~from the controller. If no suffix is desired, set this property to the empty string (""). dim suffix as string func suffix (newVal as string) endfunc #doc prop commObject ~commObject defines which GalilCommunication object will be used to communicate with ~the controller. You should create one GalilCommunication object for each motion controller ~you wish to communicate with. By setting the commObject property, you can control wich ~motion controller this object communicates with.

Most projects will require only ~one GalilCommunication object, and this property will automatically be set to refer to that ~communication object. dim commObject as objref GalilCommunication #doc prop command ~command defines the command (or series of commands) to execute on the controller ~when this button is pressed. This property can be set to any valid command, or any ~semicolon delimited series of commands. Refer to the Command Reference Manual for your ~controller for a list of valid commands. dim command as string func command (newVal as string) endfunc #doc prop pollInterval ~pollInterval defines, in milliseconds, then amount of time that will elapse between ~polls to the controller. The minimum supported value is 40 ms. It is recommended that you ~use the highest possible value for this property as excessive polling will reduce the ~responsiveness of the terminal. Also, you may want to limit the total number of polling ~objects that can be visible (enabled) at once in order to enhance performance.

~In order to maximize performance, if this object, or the screen on which it resides is ~disabled, then it will cease polling. Once the object (or parent screen) is re-enabled, ~it will immediately poll the controller once to refresh its value, then resume normal polling. dim pollInterval as integer func pollInterval (newVal as integer) endfunc func StartUp() handles MSG_INIT endfunc func Draw() handles MSG_DRAW endfunc handles MSG_TIMETICK endfunc handles MSG_ZENABLED endfunc handles GMC_CommSuccess endfunc handles GMC_CommFailure endfunc #doc override ResponseReceived #param response:The data returned from the controller. You may modify this paramater for formatting reasons. Any changes to this paramater will be reflected in the final display. ~This event called whenever this object receives receives a response from the controller as a ~result of a poll. The paramater response contains the string that was returned from ~the controller. You may modify response in order to change the final string which ~will be displayed in this object. func ResponseReceived (response as reference to string) endfunc #doc override FailureReceived #param response:The response returned by the controller minus the final colon terminator. If you modify this paramater, the final display will reflect the results of the modifications #param failReason:The reason why this event is generated. Either GMC_FailCommunications or GMC_FailBadCommand ~This event is triggered when a command has been sent to the controller, but the controller ~failed to respond, responded incorrectly, or returned an error response. func FailureReceived(response as reference to string, failReason as GMC_FailureReason) endfunc func ToolAttach (attachTo as objref) handles MSG_TOOL_ATTACH endfunc func ToolAttached (newParent as objref) handles MSG_TOOL_ATTACHED endfunc func ToolMove (dx as integer, dy as integer) handles MSG_TOOL_MOVE endfunc func ToolGetHandles (xCoords[] as reference to integer, -> yCoords[] as reference to integer, -> cursors[] as reference to GuiCursors, -> closed as reference to boolean) handles MSG_TOOL_GETHANDLES endfunc func ToolMoveHandle (handleNum as reference to integer, dx as integer, dy as integer) handles MSG_TOOL_MOVEHANDLE endfunc func ToolDragCreate (parentObj as objref, x1 as integer, y1 as integer, -> x2 as integer, y2 as integer) handles MSG_TOOL_DRAGCREATE endfunc Enddef #endfile #ifnot Galil_mc_src_GMCCommand #option Galil_mc_src_GMCCommand Define Area Object type GMCCommandDisplay #ToolImage "80013FFC40025EFA5F7A403A5F7A5E7A5EFA5C025EFA5F7A40023FFC8001" '******************************************************************* 'Object: GMCCommandDisplay 'Author: Jeremy Richards 'Date: 27 May 2004 ' 'Description: Executes a command (or series of commands) ' on the motion controller when you push this button ' When the command(s) complete execution, the results ' are optionally displayed. ' 'Version: 1.52 'Copyright 2004 QSI Corporation 'Permission is granted to copy, distribute and modify this code, 'provided that this copyright statement is preserved '******************************************************************* #doc object GMCCommandDisplay ~This object provides a simple interface to execute an arbitray command ~(or series of commands) on your Galil Motion Controller. This object ~appears as a push button which when pushed, executes the commands ~defined by the command property, then optionally displays the ~results in the button. library galil_mc source galilcommunications library standard source ToolMessages library standard source TextMultilineBDF library standard source notes Library Standard Source Draw3DRect dim enabled as boolean init enabled := true func enabled(newval as boolean) enabled := newval Enable (me, enabled) endfunc dim parent as objref init parent := default func parent(newval as objref) parent := newval Attach(me, parent) endfunc dim xPos as integer init xPos := 0 func xPos(newval as integer) xPos := newVal Relocate (me, xPos, yPos) RecalcText() endfunc dim yPos as integer init yPos := 0 func yPos(newval as integer) yPos := newval Relocate (me, xPos, yPos) RecalcText() endfunc dim width as integer init width := 25 func width(newval as integer) width := newval Resize (me, width, height) RecalcText() endfunc dim height as integer init height := 25 func height(newval as integer) height := newval Resize (me, width, height) RecalcText() endfunc dim bgColor as color init bgColor := col_183 func bgColor (newVal as color) bgColor := newVal Rerender(me) endfunc dim fgColor as color init fgColor := rgb_black func fgColor (newVal as color) fgColor := newVal Rerender(me) endfunc #doc prop bevelWidth ~This determines the width (in pixels) of the 3D border surrounding the object dim bevelWidth as integer init bevelWidth := 2 func bevelWidth (newVal as integer) bevelWidth := newVal RecalcText() endfunc #doc prop bevelStyle ~This determines the style of the 3D bevel on this object. Possible values include: ~
GMC_BevelRaised
The bevel will appear to rise out of the background. ~
GMC_BevelSunken
The bevel will appear sunken into the background. ~
GMC_BevelNone
No bevel will be drawn. dim bevelStyle as GMC_BevelStyle init bevelStyle := GMC_BevelRaised func bevelStyle (newVal as GMC_BevelStyle) bevelStyle := newVal RecalcText() endfunc #doc prop inset ~This determines how close text is allowed to run to the bevel of this object (or the ~edge of the object if the bevel is turned off). This value must always be at least 1. dim inset as integer init inset := 1 func inset (newVal as integer) if newval < 1 then newval = 1 endif inset := newVal RecalcText() endfunc dim font as bdffont init font := default func font(newVal as bdffont) font := newVal RecalcText() endfunc #doc prop caption ~Caption defines a string that will be displayed above the prefix, suffix, ~and the result of the most recent command execution. You may set this value to an empty ~string (""), if you do not want to display a caption. dim caption as string init caption := "" func caption (newVal as string) caption := newVal RecalcText() endfunc #doc prop hideResults ~If hideResults is set to true, then any data returned from the controller in ~response to executing is not displayed in this object. Additionally, the prefix and ~suffix properties are hidden. If this property is set to false, ~then any data returned by the controller is displayed on the second line along with ~the prefix and suffix properties dim hideResults as boolean init hideResults := false func hideResults(newVal as boolean) hideResults := newVal RecalcText() endfunc #doc prop prefix ~The value defined by prefix will be displayed in front of any response returned ~from the controller. If no prefix is desired, set this property to the empty string (""). dim prefix as string init prefix := "" func prefix (newVal as string) prefix := newVal RecalcText() endfunc #doc prop suffix ~The value defined by suffix will be displayed following any response returned ~from the controller. If no suffix is desired, set this property to the empty string (""). dim suffix as string init suffix := "" func suffix (newVal as string) suffix := newVal RecalcText() endfunc dim xJustify as HAlign init xJustify := HA_Center func xJustify(newVal as HAlign) xJustify := newVal RecalcText() endfunc dim yJustify as VAlign init yJustify := VA_Center func yJustify (newVal as VAlign) yJustify := newVal RecalcText() endfunc dim Tone as _Note init tone := NOTE_USEDEFAULT #doc prop commObject ~commObject defines which GalilCommunication object will be used to communicate with ~the controller. You should create one GalilCommunication object for each motion controller ~you wish to communicate with. By setting the commObject property, you can control wich ~motion controller this object communicates with.

Most projects will require only ~one GalilCommunication object, and this property will automatically be set to refer to that ~communication object. dim commObject as objref GalilCommunication init commObject := empty #doc prop command ~command defines the command (or series of commands) to execute on the controller ~when this button is pressed. This property can be set to any valid command, or any ~semicolon delimited series of commands. Refer to the Command Reference Manual for your ~controller for a list of valid commands. dim command as string init command := "TPX" func command (newVal as string) command := newVal commandCount := GMC_CountCommands (command) endfunc private dim commandCount as integer func StartUp() handles MSG_INIT Relocate (me, xPos, yPos) Resize (me, width, height) Enable (me, enabled) Attach (me, parent) Command(command) Inset(inset) GMC_VerifyCommObj(commObject) RecalcText() endfunc private func RecalcText() dim bdr as integer if bevelStyle == GMC_BevelNone then bdr = inset else bdr = bevelWidth + inset endif if hideResults then displayString := caption else displayString := caption + "\n" + prefix + lastResponse + suffix endif _TextRectProcess (xPos+bdr, yPos+bdr, width-2*bdr, height-2*bdr, displayString, -> xJustify, yJustify, font, brkInfo, misc) allowReleaseOffset := false Rerender(me) endfunc private dim isPressed as boolean private dim allowReleaseOffset as boolean private dim lastResponse as string private dim displayString as string private dim brkInfo[], misc[] as integer func Draw() handles MSG_DRAW SetBgColor(bgcolor) SetFgColor(bgcolor) DrawBox (xPos, yPos, xPos+width-1, yPos+height-1) _TextRectRender(displayString, font, brkInfo, misc, fgColor, bgColor, true) if isPressed then if bevelStyle == gmc_bevelraised then _3dframe (xpos, ypos, xpos+width-1, ypos+height-1, _shadow3dColors[bgcolor], _highlight3dColors[bgcolor], bevelwidth) elseif bevelStyle == gmc_bevelsunken then _3dframe (xpos, ypos, xpos+width-1, ypos+height-1, _highlight3dcolors[bgcolor], _shadow3dColors[bgcolor], bevelwidth) endif else if bevelStyle == gmc_bevelraised then _3dframe (xpos, ypos, xpos+width-1, ypos+height-1, _highlight3dcolors[bgcolor], _shadow3dColors[bgcolor], bevelwidth) elseif bevelStyle == gmc_bevelsunken then _3dframe (xpos, ypos, xpos+width-1, ypos+height-1, _shadow3dColors[bgcolor], _highlight3dColors[bgcolor], bevelwidth) endif endif endfunc private func SetIsPressed(newState as boolean) if newState == isPressed then return endif 'Note: Changing anything which affects the object text display size while the text is 'depressed can result in slightly offset text. if newState then allowReleaseOffset := true if bevelStyle == GMC_bevelSunken then _TRPQuickOffset(-1, -1, brkInfo, misc) else _TRPQuickOffset(1,1,brkInfo, misc) endif elseif allowReleaseOffset then if bevelStyle == GMC_BevelSunken then _TRPQuickOffset (1,1, brkInfo, misc) else _TRPQuickOffset (-1, -1, brkInfo, misc) endif endif IsPressed := newState Rerender(me) endfunc private func ScreenPress (xdown as integer, ydown as integer) returns boolean handles MSG_SCREEN_PRESS SetIsPressed(true) return true endfunc private func ScreenMove (xto as integer, yto as integer, xfrom as integer, yfrom as integer) returns boolean handles MSG_SCREEN_MOVE if isPressed then if (xto < xPos) or (xto >= xPos+width) or (yto < yPos) or (yto >= yPos+height) then SetIsPressed(false) endif endif return true endfunc private func ScreenRelease (xup as integer, yup as integer) returns boolean handles MSG_SCREEN_RELEASE dim doAction as boolean doAction := isPressed SetIsPressed(false) if doAction then _PlayTone (tone, 100, false) if Click() then commObject.SendAsciiCommandStreamCounted(command, me, 0, commandCount) endif endif return true endfunc #doc prop executeCommand ~executeCommand exists to provide a programatic interface to this object. Set ~this property to true whenever you wish to execute the command (the same as if you had ~pressed then released this object).

~Note: This property is intended to be write only. Reading this property will always ~return false. It is not necessary to set this property for commands to execute when ~you push this object. It is only available to allow you to write Qlarity program code ~to manually execute this object's command. If you intend to use this object exclusively ~programmatically via the executeCommand property rather than touching the object on the ~touch screen, then it is recommended that you use the GMCCommandExec object instead. dim executeCommand as boolean init executeCommand := false func ExecuteCommand(newVal as boolean) if newVal then commObject.SendAsciiCommandStreamCounted(command, me, 0, commandCount) endif executeCommand := false endfunc private func Success(parm as integer) returns boolean handles GMC_CommSuccess lastResponse := trim(commObject.curResponse) ResponseReceived(lastResponse) RecalcText() return true endfunc private func Failure(parm as integer) returns boolean handles GMC_CommFailure lastResponse := trim(commObject.curResponse) FailureReceived(lastResponse, commObject.curFailureReason) RecalcText() return true endfunc #doc override Click ~The Click event is called whenever a user touches then releases this object. ~normally, this will cause the command(