【文章內(nèi)容簡介】
e and progressing to the highest order byte. There will be word swapping.The Husky machine requires the following work parameters to configure the link:? Network ID of the Husky OI? Network ID of the print hostThe supervisor sets these parameters on the “Host Link Configuration” screen.Preliminary investigations show the Ether channel can support in the order of 50 machines. This is based on the following:? Derating the 10 Mbps Ether down to 4 Mbps actual data transferred. (Studies have shown Ether to degrade after a total load of 5 Mbps).? 4 KBytes transferred between the Husky machine and the host during a one second interval. (The load is unlikely to be this high, even with a short machine cycle time).? One 300 KByte print screen operation is taking place during the above one second interval.? One 10 KByte setup is being transferred during the above one second interval.In practice the performance will be limited more by the Husky and host processors and interface cards than by the munications channel. Additionally, other physical factors would cause the work to be segmented into smaller works long before the maximum is reached. Application InterfaceThe following describes the application messages and corresponding parameters used to municate between the host system and the Husky molding machine. Type 1 Machine FunctionsType 1 messages provide the host system with access to variables and alarms on the Husky machine. Type 1 messages are also used to send machine setup information between the host and the Husky machine.Communication for type 1 messages is via TCP sockets. At startup time, the host system establishes a connection to port number 5118 decimal on the Husky machine. This connection is used to exchange type 1 messages.All messages begin with a two byte message size (shown below as message_size), followed by a two byte mand word. The message size includes all elements within the message. Many, but not all, machine function mands have responses. Commands have the most significant bit of the mand word set to zero. Responses have the most significant bit of the mand word set to one (0x8000).A list of type 1 messages specifying the request and the initiating machine is given below:Message Initiated by:Initialize the connection/Verify connection Husky OIStart of job HostLanguages HostList process variable names HostRead process variables HostEnd of cycle Husky OIEvents Husky OICycle Interruption Husky OICycle Interruption Query Host9 / 64SPC parameters Husky OISPC parameters query HostMachine Status Query HostUpload Request HostBegin setup upload Husky OIUpload setup data Husky OIEnd setup upload Husky OIBegin setup download HostDownload setup data HostEnd setup download HostError condition Husky OI or HostSample data exchangeThe following is an example of a typical type 1 message exchange.Function Husky OI HostInitialize Connection INITINIT response, result=0Get languagesLANGUAGESresponse, result=0English, French, GermanLANGUAGESGet variablesLIST response EnglishLIST, EnglishStart JobSTART JOB response, result=0START JOBDownload setupBEGIN DOWNLOAD response, result=0DOWNLOAD responseresult=0DOWNLOAD responseresult=0DOWNLOAD responseresult=0END DOWNLOADresponseBEGIN DOWNLOADDOWNLOAD DATA block 0DOWNLOAD DATA block 1DOWNLOAD DATA block 2END DOWNLOADMachine makes partsEND OF CYCLESPC Parameter ChangeSPC PARAMETERSMachine makes partsEND OF CYCLE SPC Parameter Query SPC PARAMETERSSPC PARAMETER QUERYMachine makes partsEND OF CYCLE Cycle Interruption CYCLE INTERRUPTIONMachine makes partsEND OF CYCLEMachine makes partsEND OF CYCLEEvent EVENTSave setupUpload not grantedBEGIN UPLOADBEGIN UPLOAD responseresult=111 / 64Try againOK nowBEGIN UPLOADUPLOAD DATAblock 0UPLOAD DATAblock 1UPLOAD DATAblock 2END UPLOADBEGIN UPLOAD responseresult=0UPLOAD response, result=0UPLOAD response, result=0UPLOAD response, result=0END UPLOAD response30 seconds...Check link INITINIT response, result=030 seconds...Check linkComm errorReestablish linkInitialize connectionINITINITERROR, invalid message sizeINIT response, result=030 seconds...Check link15 seconds...TimeoutReestablish linkInitialize connectionINITINITINIT response, result=0 Initialize the connectionAt startup, after the connection is established, the Husky machine sends the “init” request message to the host.This must be the first message sent after establishing the connection. It is used to verify that the connection exists between the correct host, Husky machine pair.The “init” message is also used to verify that the Husky machinehost connection is still up. Every 30 seconds the Husky machine sends the “init” request message to check the status of the link.message_size 2 byte integer0x10 2 byte integerserial_number 6 byte ASCIIThe “init” response message from the host is:message_size 2 byte integer0x8010 2 byte integerresult 2 byte integersynch_time 4 byte time formatserial_number 6 byte ASCIIThe serial_number field contains the serial number for the Husky machine. It is left justified and padded on the right with spaces. If the serial_number field received does not match the Husky machine serial number the host expects, the host should respond with a failed result (see result field below) and tear down the connection. The serial number loaded into the host system is returned in the response message from the host.The result field contains a response code to the request. If the serial number in the message matches the serial number