Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Jack H.Integration and automation of manufacturing systems.2001.pdf
Скачиваний:
86
Добавлен:
23.08.2013
Размер:
3.84 Mб
Скачать

page 102

network->deinit_write(); } else if (mode == LISTENER){

network->deinit_read();

}

delete network; network = NULL;

*state = NOTINITIALIZED;

} else {

error_log(MINOR, "Cannot uninitialize network unless

waitingforconnection");

*error_flag = ERROR;

}

} else if(*command == SET){ if(*operand1 == MODE){

if(*state == NOTINITIALIZED){ mode = *operand2;

} else {

error_log(MINOR, "Can’t set network mode after

initialization");

*error_flag = ERROR;

}

} else if(*operand1 == PARAM){ if(*state == NOTINITIALIZED){

if(params != NULL) delete params; params = new char[strlen(operand3)+1]; strcpy(params, operand3);

} else {

error_log(MINOR, "Can’t set network parameters, in

wrong state");

*error_flag = ERROR;

}

}else if(*operand1 == TIMEOUT){ timeout = *operand2;

}else {

error_log(MINOR, "Network SET type not recognized"); *change_lock = FALSE;

*error_flag = ERROR;

}

} else {

error_log(MINOR, "Network command not recognized"); *error_flag = ERROR;

}

}

*change_lock = FALSE;

return error;

}

4.6 DESIGN CASES

Consider the case of the network

page 103

4.7 SUMMARY

Networks come in a variety of topologies, but buses are most common on factory floors.

The OSI model can help when describing network related hardware and software.

Networks can be connected with a variety of routers, bridges, gateways, etc.

Ethernet is common, and can be used for high speed communication.

The internet can be use to monitor and control shop floor activities.

4.8 PRACTICE PROBLEMS

1. Explain why networks are important in manufacturing controls.

(ans. These networks allow us to pass data between devices so that individually controlled systems can be integrated into a more complex manufacturing facility. An example might be a serial connection to a PLC so that SPC data can be collected as product is made, or recipes downloaded as they are needed.)

2. Is the OSI model able to describe all networked systems?

(ans. The OSI model is just a model, so it can be used to describe parts of systems, and what their functions are. When used to describe actual networking hardware and software, the parts may only apply to one or two layers. Some parts may implement all of the layers in the model.)

3. What are the different methods for resolving collisions on a bus network?

(ans. When more than one client tries to start talking simultaneously on a bus network they interfere, this is called a collision. When this occurs they both stop, and will wait a period of time before starting again. If they both wait different amounts of time the next one to start talking will get priority, and the other will have to wait. With CSMA/CD the clients wait a random amount of time. With CSMA/BA the clients wait based upon their network address, so their priority is related to their network address. Other networking methods prevent collisions by limiting communications. Master-slave networks require that client do not less talk, unless they are responding to a request from a master machine. Token passing only permits the holder of the token to talk.)