《程序设计基础教程 - -C语言版》实验指导手册

2019-04-14 22:01

Manipulator is now used as a industrial robots in use, the control objectives often appear often in industrial automation. Industrial automation technology has gradually matured, as mature a technology line has been rapid development in industrial automation as a separate subject. Manipulator application began to filter into welding, logistics, mechanical processing, and other industries. Especially at high or very low temperatures, full of poisonous gases, high radiation case, robot in similar circumstances showed great use also brings great convenience to the staff. Precisely because of this robot to get people's attention began to be a high degree of development. Labor rates, working conditions, labor intensive aspects of promoting development. Both at home and abroad to develop the PLC (programmable logic controller) is in various special circumstances and under special conditions set for mechanical devices. Now turned on the development of the microelectronics automatic control technology and the rapid development of thetrains, the success of PLC hardware software and simulation control win big and successful development, now continues to develop as a factory automation standards. Because robots are good development of the technology makes a good optimization of productive capital, and robot shows this unique advantages, such as: has good compatibility, wide availability, hardware is complete, and programming that can be mastered in a short time, so in the context of industrial PLC applications became ubiquitous. Manipulator in many developed country agriculture and industry has been applied, such as the use of mechanical harvesting large areas of farmland, repeated operations on the high-speed line that uses a robotic arm, and so on. oday, the high level of automation combined with restrictions on the manipulator development level is slightly lower than the international. The design is mainly arm welding machine by PLC Automation control. This of design let designers on in school by learn of has a must of consolidation, understand has some usually didn't opportunities awareness in world range within some leading level of knowledge has has must awareness, hope designers can in yihou of design in the can success of using in this design in the proceeds of experience 1.2 manipulator in both at home and abroad of research profile automation mechanical arm research began Yu 20th century medium-term, after years with with computer and automation technology of development, Makes mechanical arm on the Grand stage of industrial automation and shine, gradually became an industrial evaluation standards, and its importance can be seen. Now original robotic arm spent most of mass production and use on the production line, which is programmed robotic arm. As the first generation of manipulator position control systems main features, although not back several generations that can detect the external environment, but can still successfully complete like welding, painting, delivery as well as for materials simple movements. Second generation mechanicalarms are equipped with sensors and manipulators have the environment there is a certain amount of \chanical arm is to use the program as a basis. Difference is that the robot begand四川师范大学数学与软件科学学院信息与计算科学专业

《程序设计基础教程----C语言版》课程实验

指导手册

本实验指导手册旨在指导数学与软件科学学院信息与计算科学专业《程序设计基础教程----C语言版》(专业必修课)的实验教学活动过程。其主要使用对象为本课程主讲教师和实验指导教师。它可以作为教学过程中的教学辅助参考资料,也可以作为学生在本门课程的学习中,结合实际教学内容,完成相关实验并填写实验报告的主要依据。具体实施过程中,除开各实验中要求的必做题目外,教师可结合实际教学情况,根据学生接受程度作适当扩展。学生在进行实践设计活动时,也可以结合自身掌握和学习的实际情况进行有选择地实践。

本指导手册仅针对本学院信息与计算科学专业而设置。 本实验手册编写的参考书籍:

1.《程序设计基础教程----C语言版》,冯山,马廷淮 主编,北京:科学出版社,2008年5月

2.《C语言程序设计教程(第二版)》,谭浩强,张基温,唐永炎 编著,北京:高等教育出版社,2002年3月

3.《C语言习题集与上机指导(第二版)》,谭浩强,张基温 主编,北京:高等教育出版社,2002年1月

引言

程序设计是实践性很强的课程。实践也是学好程序设计课程中必不可少的重要环节。程序设计的实践分两个步骤:一是设计和编写解决问题的程序算法流程,并在此基础上编写源程序代码;二是在计算机上对程序进行调试,并使程序完成问题的求解过程,进行相应的逻辑测试。

实验过程中,应当注意如下问题:

(1) 上机实习的主要目的是训练C语言程序的上机调试能力和分析、解决调试过程中遇到的问题的能力。并在此过程中逐步提高程序编写与问题分析能力。而不是简单地对教材上的实例做验证式的操作;

(2) 上机内容可以结合教材内容和习题,或由老师布置专门的上机习题进行; (3) 为提高上机效果。必须在上机之前准备好上机的基本内容并编写好上机程

manipulator control mode and programmable controllers introduction 2.1 Select discussion with manipulator control 2.1.1 classification of control relays and discrete electronic circuit can control old industrial equipment, but also more common. Mainly these two relatively cheap and you can meet the old-fashioned, simple (or simple) industrial equipment. So he can see them now, however these two control modes (relay and discrete electronic circuits) are these fatal flaws: (1) cannot adapt to the complex logic control, (2) only for the current project, the lack of compatibility and (3) not reforming the system with equipment improvements. Spring for the development of China's modern industrial automation technology the substantial increase in the level of industrial automation, completed the perfect relay of the computer too much. In terms of controlling the computer showed his two great advantages: (1) each of the hardware can be installed on one or more microprocessors; (2) the official designer of the software writing content control is all about. Now in several ways in the context of industrial automation can often be seen in three ways: (1) Programmable Logical Controller (referred to as IPC); (2) Distributed Control System (DCS for short), and (3) the Programmable Logical Controller (PLC for short). 2.1.2 PLC and the IPC and DCS contrast contrast 1, each of the three technologies of origins and development requirements for fast data processing makes it invented the computer. The men brought in terms of hardware there, using a high level of standardization, can use more compatibility tools, is a rich software resources, especially the need for immediacy in operational systems. So the computer can effectively control is used to control and meet its speed, on the virtual model, real-time and in computational requirements. Distributed system started with a control system for industrial automatic instrument used to control, whereas now it is successfully developed into industrial control computer used as a central collection and distribution system and transition of distributed control system in analogue handling, loop control, has begun to reflect the use of a huge advantage. Though distributed system has great advantages in loop regulation, but only as a means of continuous process control. Optimization of PLC is the corresponding relay needs was born, its main use in the work order control, early primary is replaced relay this hulking system, focused on the switch controlling the running order of functions. Marked by the microprocessor in the early 1970 of the 20th century emerged, micro-electronics technology has developed rapidly, people soon microelectronics processing technology will be used in the Programmable Logical Controller (that is Manipulator is now used as a industrial robots in use, the control objectives often appear often in industrial automation. Industrial automation technology has gradually matured, as mature a technology line has been rapid development in industrial automation as a separate subject. Manipulator application began to filter into welding, logistics, mechanical processing, and other industries. Especially at high or very low temperatures, full of poisonous gases, high radiation case, robot in similar circumstances showed great use also brings great convenience to the staff. Precisely because of this robot to get people's attention began to be a high degree of development. Labor rates, working conditions, labor intensive aspects of promoting development. Both at home and abroad to develop the PLC (programmable logic controller) is in various special circumstances and under special conditions set for mechanical devices. Now turned on the development of the microelectronics automatic control technology and the rapid development of thetrains, the success of PLC hardware software and simulation control win big and successful development, now continues to develop as a factory automation standards. Because robots are good development of the technology makes a good optimization of productive capital, and robot shows this unique advantages, such as: has good compatibility, wide availability, hardware is complete, and programming that can be mastered in a short time, so in the context of industrial PLC applications became ubiquitous. Manipulator in many developed country agriculture and industry has been applied, such as the use of mechanical harvesting large areas of farmland, repeated operations on the high-speed line that uses a robotic arm, and so on. oday, the high level of automation combined with restrictions on the manipulator development level is slightly lower than the international. The design is mainly arm welding machine by PLC Automation control. This of design let designers on in school by learn of has a must of consolidation, understand has some usually didn't opportunities awareness in world range within some leading level of knowledge has has must awareness, hope designers can in yihou of design in the can success of using in this design in the proceeds of experience 1.2 manipulator in both at home and abroad of research profile automation mechanical arm research began Yu 20th century medium-term, after years with with computer and automation technology of development, Makes mechanical arm on the Grand stage of industrial automation and shine, gradually became an industrial evaluation standards, and its importance can be seen. Now original robotic arm spent most of mass production and use on the production line, which is programmed robotic arm. As the first generation of manipulator position control systems main features, although not back several generations that can detect the external environment, but can still successfully complete like welding, painting, delivery as well as for materials simple movements. Second generation mechanicalarms are equipped with sensors and manipulators have the environment there is a certain amount of \chanical arm is to use the program as a basis. Difference is that the robot begand 序,尽量在上机之前先作好预先的阅读分析工作;

(4) 上机调试的基本方法:语法检查(编译)==>逻辑检查(设计者检查)==>测试。

上机实验的主要步骤:

(1) 了解实验目的和要求,并椐此复习或阅读相关教材内容;

(2) 根据题目要求,事先编写好程序,并经过设计者静态检查程序的语法正确性和逻辑正确性,分析可能出现的问题;

(3) 设计好上机时准备测试程序的用例;

(4) 上机调试通过程序,并记录上机调试中出现的问题和测试结论等,写出实验报告。

调试过程中,尤其要注意各种语法错误、逻辑错误调试经验的积累。 实验报告的主要内容: (1) 实验题目; (2) 目的要求;

(3) 程序说明(如程序结构、各模块的算法和数据结构等); (4) 经调试后的程序清单; (5) 测试情况说明;

(6) 分析(包含没有通过的程序的原因分析)。

实验报告的具体内容填写格式,参见《四川师范大学实验报告手册》格式的规定。其中,程序清单请附着在相应的实验单元后面,程序结果、说明与分析等写在实验结果处,如不够,可另行附页。

实验一 C语言程序的运行环境和运行一个C语言程序的方法

(2学时)

实验目的:

(1) 熟悉所用计算机系统的基本操作方法以及在该系统下安装、编辑、编译、连接和运行一个C语言源程序的基本操作步骤(以Turboc C为基本背景);

(2) 学习基本的C语言程序设计与调试环境设置方法; (3) 通过运行简单的C语言程序,了解C语言程序的特点。 实验内容:(要求至少调试3个以上的简单程序)

1.如果系统没有安装TC环境,则安装,否则,跳过此步;

2.配置好TC环境,熟悉TC编辑器的基本操作命令及其它基本功能;

manipulator control mode and programmable controllers introduction 2.1 Select discussion with manipulator control 2.1.1 classification of control relays and discrete electronic circuit can control old industrial equipment, but also more common. Mainly these two relatively cheap and you can meet the old-fashioned, simple (or simple) industrial equipment. So he can see them now, however these two control modes (relay and discrete electronic circuits) are these fatal flaws: (1) cannot adapt to the complex logic control, (2) only for the current project, the lack of compatibility and (3) not reforming the system with equipment improvements. Spring for the development of China's modern industrial automation technology the substantial increase in the level of industrial automation, completed the perfect relay of the computer too much. In terms of controlling the computer showed his two great advantages: (1) each of the hardware can be installed on one or more microprocessors; (2) the official designer of the software writing content control is all about. Now in several ways in the context of industrial automation can often be seen in three ways: (1) Programmable Logical Controller (referred to as IPC); (2) Distributed Control System (DCS for short), and (3) the Programmable Logical Controller (PLC for short). 2.1.2 PLC and the IPC and DCS contrast contrast 1, each of the three technologies of origins and development requirements for fast data processing makes it invented the computer. The men brought in terms of hardware there, using a high level of standardization, can use more compatibility tools, is a rich software resources, especially the need for immediacy in operational systems. So the computer can effectively control is used to control and meet its speed, on the virtual model, real-time and in computational requirements. Distributed system started with a control system for industrial automatic instrument used to control, whereas now it is successfully developed into industrial control computer used as a central collection and distribution system and transition of distributed control system in analogue handling, loop control, has begun to reflect the use of a huge advantage. Though distributed system has great advantages in loop regulation, but only as a means of continuous process control. Optimization of PLC is the corrsponding relay needs was born, its main use in the work order control, early primary is replaced relay this hulking system, focused on the switch controlling the running order of functions. Marked by the microprocessor in the early 1970 of the 20th century emerged, micro-electronics technology has developed rapidly, people soon microelectronics processing technology will be used in the Programmable Logical Controller (that isManipulator is now used as a industrial robots in use, the control objectives often appear often in industrial automation. Industrial automation technology has gradually matured, as mature a technology line has been rapid development in industrial automation as a separate subject. Manipulator application began to filter into welding, logistics, mechanical processing, and other industries. Especially at high or very low temperatures, full of poisonous gases, high radiation case, robot in similar circumstances showed great use also brings great convenience to the staff. Precisely because of this robot to get people's attention began to be a high degree of development. Labor rates, working conditions, labor intensive aspects of promoting development. Both at home and abroad to develop the PLC (programmable logic controller) is in various special circumstances and under special conditions set for mechanical devices. Now turned on the development of the microelectronics automatic control technology and the rapid development of thetrains, the success of PLC hardware software and simulation control win big and successful development, now continues to develop as a factory automation standards. Because robots are good development of the technology makes a good optimization of productive capital, and robot shows this unique advantages, such as: has good compatibility, wide availability, hardware is complete, and programming that can be mastered in a short time, so in the context of industrial PLC applications became ubiquitous. Manipulator in many developed country agriculture and industry has been applied, such as the use of mechanical harvesting large areas of farmland, repeated operations on the high-speed line that uses a robotic arm, and so on. oday, the high level of automation combined with restrictions on the manipulator development level is slightly lower than the international. The design is mainly arm welding machine by PLC Automation control. This of design let designers on in school by learn of has a must of consolidation, understand has some usually didn't opportunities awareness in world range within some leading level of knowledge has has must awareness, hope designers can in yihou of design in the can success of using in this design in the proceeds of experience 1.2 manipulator in both at home and abroad of research profile automation mechanical arm research began Yu 20th century medium-term, after years with with computer and automation technology of development, Makes mechanical arm on the Grand stage of industrial automation and shine, gradually became an industrial evaluation standards, and its importance can be seen. Now original robotic arm spent most of mass production and use on the production line, which is programmed robotic arm. As the first generation of manipulator position control systems main features, although not back several generations that can detecthe external environment, but can still successfully complete like welding, painting, delivery as well as for materials simple movements. Second generation mechanicalarms are equipped with sensors and manipulators have the environment there is a certain amount of \chanical arm is to use the program as a basis. Difference is that the robot begand3.完成并熟悉程序输入、编译、连接、运行过程,直到程序输出结果正确; 4.学习基本的调试程序方法(包含编译、连接错误信息的正确理解); 5.可参考的程序实例如下(也可以参考教材范例):

1) 最简单的C语言程序: int main(void) {

printf(\ return 0; }

2) 引用C语言函数库进行计算的程序:

/*Please try exercises in chapter one of textbook in page 15*/ #include \int main(void) {

float fX;

fX=sin(2.2922);

printf(\ return 0; } 3) 引用自定义函数的C语言程序:

/*This is the function of average for data fA,fB,fC*/ float average(float fA,float fB,float fC) {

float fAvg;

fAvg=(fA+fB+fC)/3.0; return fAvg; }

int main(void) {

float x1,x2,x3;

printf(\ scanf(\ printf(\

fX1,fX2,fX3,average(fX1,fX2,fX3));

return 0; } 4) 求1+2+3+...+100; 5) 给定5个数,求其最小者; 6) 求a+|b|。 实验准备:

(1) 计算机设备;(2) 程序调试环境的准备,如TC环境;(3) 实验源程序准备。 实验步骤:

manipulator control mode and programmable controllers introduction 2.1 Select discussion with manipulator control 2.1.1 classification of control relays and discrete electronic circuit can control old industrial equipment, but also more common. Mainly these two relatively cheap and you can meet the old-fashioned, simple (or simple) industrial equipment. So he can see them now, however these two control modes (relay and discrete electronic circuits) are these fatal flaws: (1) cannot adapt to the complex logic control, (2) only for the current project, the lack of compatibility and (3) not reforming the system with equipment improvements. Spring for the development of China's modern industrial automation technology the substantial increase in the level of industrial automation, completed the perfect relay of the computer too much. In terms of controlling the computer showed his two great advantages: (1) each of the hardware can be installed on one or more microprocessors; (2) the official designer of the software writing content control is all about. Now in several ways in the context of industrial automation can often be seen in three ways: (1) Programmable Logical Controller (referred to as IPC); (2) Distributed Control System (DCS for short), and (3) the Programmable Logical Controller (PLC for short). 2.1.2 PLC and the IPC and DCS contrast contrast 1, each of the three technologies of origins and development requirements for fast data processing makes it invented the computer. The men brought in terms of hardware there, using a high level of standardization, can use more compatibility tools, is a rich software resources, especially the need for immediacy in operational systems. So the computer can effectively control is used to control and meet its speed, on the virtual model, real-time and in computational requirements. Distributed system started with a control system for industrial automatic instrument used to control, whereas now it is successfully developed into industrial control computer used as a central collection and distribution system and transition of distributed control system in analogue handling, loop control, has begun to reflect the use of a huge advantage. Though distributed system has great advantages in loop regulation, but only as a means of continuous process control. Optimization of PLC is the corresponding relay needs was born, its main use in the work order control, early primary is replaced relay this hulking system, focused on the switch controlling the running order of functions. Marked by the microprocessor in the early 1970 of the 20th century emerged, micro-electronics technology has developed rapidly, people soon microelectronics processing technology will be used in the Programmable Logical Controller (that isManipulator is now used as a industrial robots in use, the control objectives often appear often in industrial automation. Industrial automation technology has gradually matured, as mature a technology line has been rapid development in industrial automation as a separate subject. Manipulator application began to filter into welding, logistics, mechanical processing, and other industries. Especially at high or very low temperatures, full of poisonous gases, high radiation case, robot in similar circumstances showed great use also brings great convenience to the staff. Precisely because of this robot to get people's attention began to be a high degree of development. Labor rates, working conditions, labor intensive aspects of promoting development. Both at home and abroad to develop the PLC (programmable logic controller) is in various special circumstances and under special conditions set for mechanical devices. Now turned on the development of the microelectronics automatic control technology and the rapid development of thetrains, the success of PLC hardware software and simulation control win big and successful development, now continues to develop as a factory automation standards. Because robots are good development of the technology makes a good optimization of productive capital, and robot shows this unique advantages, such as: has good compatibility, wide availability, hardware is complete, and programming that can be mastered in a short time, so in the context of industrial PLC applications became ubiquitous. Manipulator in many developed country agriculture and industry has been applied, such as the use of mechanical harvesting large areas of farmland, repeated operations on the high-speed line that uses a robotic arm, and so on. oday, the high level of automation combined with restrictions on the manipulator development level is slightly lower than the international. The design is mainly arm welding machine by PLC Automation control. This of design let designers on in school by learn of has a must of consolidation, understand has some usually didn't opportunities awareness in world range within some leading level of knowledge has has must awareness, hope designers can in yihou of design in the can success of using in this design in the proceeds of experience 1.2 manipulator in both at home and abroad of research profile automation mechanical arm research began Yu 20th century medium-term, after years with with computer and automation technology of development, Makes mechanical arm on the Grand stage of industrial automation and shine, gradually became an industrial evaluation standards, and its importance can be seen. Now original robotic arm spent most of mass production and use on the production line, which is programmed robotic arm. As the first generation of manipulator position control systems main features, although not back several generations that can detect the external environment, but can still successfully complete like welding, painting, delivery as well as for materials simple movements. Second generation mechanicalarms are equipped with sensors and manipulators have the environment there is a certain amount of \chanical arm is to use the program as a basis. Difference is that the robot begand (1) 安装TC,如果已安装好,可以跳过此步; (2) 进入TC的编辑窗口,进行基本的环境设置; (3) 熟悉基本的TC编辑操作方法和文件创建、保存方法;

(4) 输入一个C语言源程序,进行编辑、编译、连接、运行。完成一个简单的程序设计,运行输出正确结果;

(5) 输入其它源程序并进行调试(注意错误提示信息); (6) 编写实验报告。 实验结果:

(1) 对TC的安装、调试、基本操作、环境设置方法等方面进行描述; (2) 对TC程序的执行过程和结果进行分析;

(3) 给出实验过程中出现的主要问题和现象以及解决的方法; (4) 程序代码及运行结果描述。

实验二 数据类型、运算符和表达式(2学时)

实验目的:

(1) 掌握C语言的数据类型的声明、定义、赋值及引用;

(2) 掌握变量和常量之间的关系,以及各种常见的常量表示方法;

(3) 掌握C语言的有关运算。算术运算中的自反、自增(++)、自减(--)运算符的使用;关系表达式和逻辑表达式的逻辑值表示方法和基本运算规律;学会在C语言环境下表示条件表达式;

(4) 掌握不同类型数据之间的转换和赋值方法。 实验内容:

主要参考实例或内容(也可以参考教材或习题实例):

1. 请变成实现教材P54页题2-4(目的:观察各种数据类型的分配空间大小); 2. 教材相关内容为基础,考察变量的声明、定义、使用的先后关系;考察不同数据类型变量之间相互赋值的结果;考察各种形式的常量表示;

3. 基本的C语言运算规律,尤其是算术运算中的自反、自增、自减等运算和关系表达式、逻辑表达式的特殊运算规律的掌握。(可参考教材习题中的2-13,2-14和2-18,例2-20);

4. 关于不同数据类型之间的转换问题,参见教材例2-5~例2-12。

注:由于本章内容是基本的程序设计基础内容,所有这些内容必须要求熟练掌握和运用。因此,其中一些实验实例由教师在课堂实践教学中进行现场示范性讲解,

manipulator control mode and programmable controllers introduction 2.1 Select discussion with manipulator control 2.1.1 classification of control relays and discrete electronic circuit can control old industrial equipment, but also more common. Mainly these two relatively cheap and you can meet the old-fashioned, simple (or simple) industrial equipment. So he can see them now, however these two control modes (relay and discrete electronic circuits) are these fatal flaws: (1) cannot adapt to the complex logic control, (2) only for the current project, the lack of compatibility and (3) not reforming the system with equipment improvements. Spring for the development of China's modern industrial automation technology the substantial increase in the level of industrial automation, completed the perfect relay of the computer too much. In terms of controlling the computer showed his two great advantages: (1) each of the hardware can be installed on one or more microprocessors; (2) the official designer of the software writing content control is all about. Now in several ways in the context of industrial automation can often be seen in three ways: (1) Programmable Logical Controller (referred to as IPC); (2) Distributed Control System (DCS for short), and (3) the Programmable Logical Controller (PLC for short). 2.1.2 PLC and the IPC and DCS contrast contrast 1, each of the three technologies of origins and development requirements for fast data processing makes it invented the computer. The men brought in terms of hardware there, using a high level of standardization, can use more compatibility tools, is a rich software resources, especially the need for immediacy in operational systems. So the computer can effectively control is used to control and meet its speed, on the virtual model, real-time and in computational requirements. Distributed system started with a control system for industrial automatic instrument used to control, whereas now it is successfully developed into industrial control computer used as a central collection and distribution system and transition of distributed control system in analogue handling, loop control, has begun to reflect the use of a huge advantage. Though distributed system has great advantages in loop regulation, but only as a means of continuous process control. Optimization of PLC is the corrsponding relay needs was born, its main use in the work order control, early primary is replaced relay this hulking system, focused on the switch controlling the running order of functions. Marked by the microprocessor in the early 1970 of the 20th century emerged, micro-electronics technology has developed rapidly, people soon microelectronics processing technology will be used in the Programmable Logical Controller (that isManipulator is now used as a industrial robots in use, the control objectives often appear often in industrial automation. Industrial automation technology has gradually matured, as mature a technology line has been rapid development in industrial automation as a separate subject. Manipulator application began to filter into welding, logistics, mechanical processing, and other industries. Especially at high or very low temperatures, full of poisonous gases, high radiation case, robot in similar circumstances showed great use also brings great convenience to the staff. Precisely because of this robot to get people's attention began to be a high degree of development. Labor rates, working conditions, labor intensive aspects of promoting development. Both at home and abroad to develop the PLC (programmable logic controller) is in various special circumstances and under special conditions set for mechanical devices. Now turned on the development of the microelectronics automatic control technology and the rapid development of thetrains, the success of PLC hardware software and simulation control win big and successful development, now continues to develop as a factory automation standards. Because robots are good development of the technology makes a good optimization of productive capital, and robot shows this unique advantages, such as: has good compatibility, wide availability, hardware is complete, and programming that can be mastered in a short time, so in the context of industrial PLC applications became ubiquitous. Manipulator in many developed country agriculture and industry has been applied, such as the use of mechanical harvesting large areas of farmland, repeated operations on the high-speed line that uses a robotic arm, and so on. oday, the high level of automation combined with restrictions on the manipulator development level is slightly lower than the international. The design is mainly arm welding machine by PLC Automation control. This of design let designers on in school by learn of has a must of consolidation, understand has some usually didn't opportunities awareness in world range within some leading level of knowledge has has must awareness, hope designers can in yihou of design in the can success of using in this design in the proceeds of experience 1.2 manipulator in both at home and abroad of research profile automation mechanical arm research began Yu 20th century medium-term, after years with with computer and automation technology of development, Makes mechanical arm on the Grand stage of industrial automation and shine, gradually became an industrial evaluation standards, and its importance can be seen. Now original robotic arm spent most of mass production and use on the production line, which is programmed robotic arm. As the first generation of manipulator position control systems main features, although not back several generations that can detecthe external environment, but can still successfully complete like welding, painting, delivery as well as for materials simple movements. Second generation mechanicalarms are equipped with sensors and manipulators have the environment there is a certain amount of \chanical arm is to use the program as a basis. Difference is that the robot begand由学生课外自由验证课堂范例、教材范例以及教材习题和相关课外参考书籍和资料,进行综合性的验证实践,并写出心得报告。具体实验范例不需要确定下来。 实验准备:

分析测试目的并根据它准备好实验内容的各种测试用例。 实验步骤:

(1) 选择测试目标;

(2) 准备测试用例和具体的测试数据; (3) 上机调试进行测试并做测试记录; (4) 进行测试分析; (5) 编写实验报告。 实验结果:

(1) 根据测试目标写出测试报告; (2) 测试结果分析说明; (3) 测试程序代码清单。

实验三 最简单的C语言程序设计(2学时)

实验目的:

(1) 掌握顺序结构的程序设计概念、方法及各种赋值语句的使用方法; (2) 掌握基本的C语言程序设计中的输入、输出语句的使用方法。 实验内容:

1. 熟悉表3-1~表3-5中给出的格式化输入、输出格式控制符及其使用方法,并上机测试教材表例3-1~例3-10,观察C语言中的数据格式化输入、输出规律和方法;

2.输入并编辑以下程序代码:

int main(void) {

int nA,nB; float fC,fD; long lE,lF;

unsigned int u,v; char ch1,ch2;

scanf(\ scanf(\ scanf(\ scanf(\ scanf(\ printf(\

printf(\

manipulator control mode and programmable controllers introduction 2.1 Select discussion with manipulator control 2.1.1 classification of control relays and discrete electronic circuit can control old industrial equipment, but also more common. Mainly these two relatively cheap and you can meet the old-fashioned, simple (or simple) industrial equipment. So he can see them now, however these two control modes (relay and discrete electronic circuits) are these fatal flaws: (1) cannot adapt to the complex logic control, (2) only for the current project, the lack of compatibility and (3) not reforming the system with equipment improvements. Spring for the development of China's modern industrial automation technology the substantial increase in the level of industrial automation, completed the perfect relay of the computer too much. In terms of controlling the computer showed his two great advantages: (1) each of the hardware can be installed on one or more microprocessors; (2) the official designer of the software writing content control is all about. Now in several ways in the context of industrial automation can often be seen in three ways: (1) Programmable Logical Controller (referred to as IPC); (2) Distributed Control System (DCS for short), and (3) the Programmable Logical Controller (PLC for short). 2.1.2 PLC and the IPC and DCS contrast contrast 1, each of the three technologies of origins and development requirements for fast data processing makes it invented the computer. The men brought in terms of hardware there, using a high level of standardization, can use more compatibility tools, is a rich software resources, especially the need for immediacy in operational systems. So the computer can effectively control is used to control and meet its speed, on the virtual model, real-time and in computational requirements. Distributed system started with a control system for industrial automatic instrument used to control, whereas now it is successfully developed into industrial control computer used as a central collection and distribution system and transition of distributed control system in analogue handling, loop control, has begun to reflect the use of a huge advantage. Though distributed system has great advantages in loop regulation, but only as a means of continuous process control. Optimization of PLC is the corresponding relay needs was born, its main use in the work order control, early primary is replaced relay this hulking system, focused on the switch controlling the running order of functions. Marked by the microprocessor in the early 1970 of the 20th century emerged, micro-electronics technology has developed rapidly, people soon microelectronics processing technology will be used in the Programmable Logical Controller (that is


《程序设计基础教程 - -C语言版》实验指导手册.doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:离婚房产分割律师实务策略

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: