LD-Driver

合集下载

ld 连接描述

ld 连接描述

ld选项和lds文件==================================================================================0. Contents1. 概论2. 基本概念3. 脚本格式4. 简单例子5. 简单脚本命令6. 对符号的赋值7. SECTIONS命令8. MEMORY命令9. PHDRS命令10. VERSION命令11. 脚本内的表达式12. 暗含的连接脚本1. 概论--------------------------------------------------------------------------------每一个链接过程都由链接脚本(linker script, 一般以lds作为文件的后缀名)控制. 链接脚本主要用于规定如何把输入文件内的section放入输出文件内, 并控制输出文件内各部分在程序地址空间内的布局. 但你也可以用连接命令做一些其他事情.连接器有个默认的内置连接脚本, 可用ld --verbose查看. 连接选项-r和-N可以影响默认的连接脚本(如何影响?).-T选项用以指定自己的链接脚本, 它将代替默认的连接脚本.你也可以使用<暗含的连接脚本>以增加自定义的链接命令.以下没有特殊说明,连接器指的是静态连接器.2. 基本概念--------------------------------------------------------------------------------链接器把一个或多个输入文件合成一个输出文件.输入文件: 目标文件或链接脚本文件.输出文件: 目标文件或可执行文件.目标文件(包括可执行文件)具有固定的格式, 在UNIX或GNU/Linux平台下, 一般为ELF格式. 若想了解更多, 可参考UNIX/Linux平台可执行文件格式分析有时把输入文件内的section称为输入section(input section), 把输出文件内的section称为输出section(output sectin).目标文件的每个section至少包含两个信息: 名字和大小. 大部分section还包含与它相关联的一块数据, 称为section contents(section内容). 一个section可被标记为“loadable(可加载的)”或“allocatable(可分配的)”.loadable section: 在输出文件运行时, 相应的section内容将被载入进程地址空间中.allocatable section: 内容为空的section可被标记为“可分配的”. 在输出文件运行时, 在进程地址空间中空出大小同section指定大小的部分. 某些情况下, 这块内存必须被置零.如果一个section不是“可加载的”或“可分配的”, 那么该section通常包含了调试信息. 可用objdump -h命令查看相关信息.每个“可加载的”或“可分配的”输出section通常包含两个地址: VMA(virtual memory address虚拟内存地址或程序地址空间地址)和LMA(load memory address加载内存地址或进程地址空间地址). 通常VMA和LMA是相同的.在目标文件中, loadable或allocatable的输出section有两种地址: VMA(virtual Memory Address)和LMA(Load Memory Address). VMA是执行输出文件时section所在的地址, 而LMA是加载输出文件时section所在的地址. 一般而言, 某section的VMA == LMA. 但在嵌入式系统中, 经常存在加载地址和执行地址不同的情况: 比如将输出文件加载到开发板的flash中(由LMA指定), 而在运行时将位于flash中的输出文件复制到SDRAM中(由VMA指定).可这样来理解VMA和LMA, 假设:(1) .data section对应的VMA地址是0x08050000, 该section内包含了3个32位全局变量, i、j和k, 分别为1,2,3.(2) .text section内包含由"printf( "j=%d ", j );"程序片段产生的代码.连接时指定.data section的VMA为0x08050000, 产生的printf指令是将地址为0x08050004处的4字节内容作为一个整数打印出来.如果.data section的LMA为0x08050000,显然结果是j=2如果.data section的LMA为0x08050004,显然结果是j=1还可这样理解LMA:.text section内容的开始处包含如下两条指令(intel i386指令是10字节,每行对应5字节):jmp 0x08048285movl $0x1,%eax如果.text section的LMA为0x08048280, 那么在进程地址空间内0x08048280处为“jmp 0x08048285”指令, 0x08048285处为movl $0x1,%eax指令. 假设某指令跳转到地址0x08048280, 显然它的执行将导致%eax寄存器被赋值为1.如果.text section的LMA为0x08048285, 那么在进程地址空间内0x08048285处为“jmp 0x08048285”指令, 0x0804828a处为movl $0x1,%eax指令. 假设某指令跳转到地址0x08048285, 显然它的执行又跳转到进程地址空间内0x08048285处, 造成死循环.符号(symbol): 每个目标文件都有符号表(SYMBOL TABLE), 包含已定义的符号(对应全局变量和static变量和定义的函数的名字)和未定义符号(未定义的函数的名字和引用但没定义的符号)信息.符号值: 每个符号对应一个地址, 即符号值(这与c程序内变量的值不一样, 某种情况下可以把它看成变量的地址). 可用nm命令查看它们. (nm的使用方法可参考本blog的GNU binutils笔记)3. 脚本格式--------------------------------------------------------------------------------链接脚本由一系列命令组成, 每个命令由一个关键字(一般在其后紧跟相关参数)或一条对符号的赋值语句组成. 命令由分号‘;’分隔开.文件名或格式名内如果包含分号';'或其他分隔符, 则要用引号‘"’将名字全称引用起来. 无法处理含引号的文件名./* */之间的是注释.4. 简单例子--------------------------------------------------------------------------------在介绍链接描述文件的命令之前, 先看看下述的简单例子:以下脚本将输出文件的text section定位在0x10000, data section定位在0x8000000:SECTIONS{. = 0x10000;.text : { *(.text) }. = 0x8000000;.data : { *(.data) }.bss : { *(.bss) }}解释一下上述的例子:. = 0x10000 : 把定位器符号置为0x10000 (若不指定, 则该符号的初始值为0)..text : { *(.text) } : 将所有(*符号代表任意输入文件)输入文件的.text section合并成一个.text section, 该section的地址由定位器符号的值指定, 即0x10000.. = 0x8000000 :把定位器符号置为0x8000000.data : { *(.data) } : 将所有输入文件的.text section合并成一个.data section, 该section的地址被置为0x8000000..bss : { *(.bss) } : 将所有输入文件的.bss section合并成一个.bss section,该section的地址被置为0x8000000+.data section的大小.连接器每读完一个section描述后, 将定位器符号的值*增加*该section的大小. 注意: 此处没有考虑对齐约束.5. 简单脚本命令--------------------------------------------------------------------------------- 1 -ENTRY(SYMBOL) : 将符号SYMBOL的值设置成入口地址.入口地址(entry point): 进程执行的第一条用户空间的指令在进程地址空间的地址)ld有多种方法设置进程入口地址, 按一下顺序: (编号越前, 优先级越高)1, ld命令行的-e选项2, 连接脚本的ENTRY(SYMBOL)命令3, 如果定义了start符号, 使用start符号值4, 如果存在.text section, 使用.text section的第一字节的位置值5, 使用值0- 2 -INCLUDE filename : 包含其他名为filename的链接脚本相当于c程序内的的#include指令, 用以包含另一个链接脚本.脚本搜索路径由-L选项指定. INCLUDE指令可以嵌套使用, 最大深度为10. 即: 文件1内INCLUDE文件2, 文件2内INCLUDE文件3... , 文件10内INCLUDE文件11. 那么文件11内不能再出现INCLUDE 指令了.- 3 -INPUT(files): 将括号内的文件做为链接过程的输入文件ld首先在当前目录下寻找该文件, 如果没找到, 则在由-L指定的搜索路径下搜索. file可以为-lfile形式,就象命令行的-l选项一样. 如果该命令出现在暗含的脚本内, 则该命令内的file在链接过程中的顺序由该暗含的脚本在命令行内的顺序决定.- 4 -GROUP(files) : 指定需要重复搜索符号定义的多个输入文件file必须是库文件, 且file文件作为一组被ld重复扫描,直到不在有新的未定义的引用出现.- 5 -OUTPUT(FILENAME) : 定义输出文件的名字同ld的-o选项, 不过-o选项的优先级更高. 所以它可以用来定义默认的输出文件名. 如a.out- 6 -SEARCH_DIR(PATH) :定义搜索路径,同ld的-L选项, 不过由-L指定的路径要比它定义的优先被搜索.- 7 -STARTUP(filename) : 指定filename为第一个输入文件在链接过程中, 每个输入文件是有顺序的. 此命令设置文件filename为第一个输入文件.- 8 -OUTPUT_FORMAT(BFDNAME) : 设置输出文件使用的BFD格式同ld选项-o format BFDNAME, 不过ld选项优先级更高.- 9 -OUTPUT_FORMAT(DEFAULT,BIG,LITTLE) : 定义三种输出文件的格式(大小端)若有命令行选项-EB, 则使用第2个BFD格式; 若有命令行选项-EL,则使用第3个BFD格式.否则默认选第一个BFD格式.TARGET(BFDNAME):设置输入文件的BFD格式同ld选项-b BFDNAME. 若使用了TARGET命令, 但未使用OUTPUT_FORMAT命令, 则最用一个TARGET命令设置的BFD格式将被作为输出文件的BFD格式.另外还有一些:ASSERT(EXP, MESSAGE):如果EXP不为真,终止连接过程EXTERN(SYMBOL SYMBOL ...):在输出文件中增加未定义的符号,如同连接器选项-uFORCE_COMMON_ALLOCATION:为common symbol(通用符号)分配空间,即使用了-r连接选项也为其分配NOCROSSREFS(SECTION SECTION ...):检查列出的输出section,如果发现他们之间有相互引用,则报错.对于某些系统,特别是内存较紧张的嵌入式系统,某些section是不能同时存在内存中的,所以他们之间不能相互引用.OUTPUT_ARCH(BFDARCH):设置输出文件的machine architecture(体系结构),BFDARCH为被BFD库使用的名字之一.可以用命令objdump -f查看.可通过man -S 1 ld查看ld的联机帮助, 里面也包括了对这些命令的介绍.6. 对符号的赋值--------------------------------------------------------------------------------在目标文件内定义的符号可以在链接脚本内被赋值. (注意和C语言中赋值的不同!) 此时该符号被定义为全局的. 每个符号都对应了一个地址, 此处的赋值是更改这个符号对应的地址.e.g. 通过下面的程序查看变量a的地址:/* a.c */#include <stdio.h>int a = 100;int main(void){printf( "&a=0x%p ", &a );return 0;}/* a.lds */a = 3;$ gcc -Wall -o a-without-lds a.c&a = 0x8049598$ gcc -Wall -o a-with-lds a.c a.lds&a = 0x3注意: 对符号的赋值只对全局变量起作用!一些简单的赋值语句能使用任何c语言内的赋值操作:SYMBOL = EXPRESSION ;SYMBOL += EXPRESSION ;SYMBOL -= EXPRESSION ;SYMBOL *= EXPRESSION ;SYMBOL /= EXPRESSION ;SYMBOL <<= EXPRESSION ;SYMBOL >>= EXPRESSION ;SYMBOL &= EXPRESSION ;SYMBOL |= EXPRESSION ;除了第一类表达式外, 使用其他表达式需要SYMBOL被定义于某目标文件.. 是一个特殊的符号,它是定位器,一个位置指针,指向程序地址空间内的某位置(或某section内的偏移,如果它在SECTIONS命令内的某section描述内),该符号只能在SECTIONS命令内使用.注意:赋值语句包含4个语法元素:符号名、操作符、表达式、分号;一个也不能少.被赋值后,符号所属的section被设值为表达式EXPRESSION所属的SECTION(参看11. 脚本内的表达式)赋值语句可以出现在连接脚本的三处地方:SECTIONS命令内,SECTIONS命令内的section描述内和全局位置;如下,floating_point = 0; /* 全局位置*/SECTIONS{.text :{*(.text)_etext = .; /* section描述内*/}_bdata = (. + 3) & ~ 4; /* SECTIONS命令内*/.data : { *(.data) }}PROVIDE关键字该关键字用于定义这类符号:在目标文件内被引用,但没有在任何目标文件内被定义的符号.例子:SECTIONS{.text :{*(.text)_etext = .;PROVIDE(etext = .);}}当目标文件内引用了etext符号,确没有定义它时,etext符号对应的地址被定义为.text section之后的第一个字节的地址.7. SECTIONS命令--------------------------------------------------------------------------------SECTIONS命令告诉ld如何把输入文件的sections映射到输出文件的各个section: 如何将输入section合为输出section; 如何把输出section放入程序地址空间(VMA)和进程地址空间(LMA).该命令格式如下:SECTIONS{SECTIONS-COMMANDSECTIONS-COMMAND...}SECTION-COMMAND有四种:(1) ENTRY命令(2) 符号赋值语句(3) 一个输出section的描述(output section description)(4) 一个section叠加描述(overlay description)如果整个连接脚本内没有SECTIONS命令, 那么ld将所有同名输入section合成为一个输出section内, 各输入section的顺序为它们被连接器发现的顺序.如果某输入section没有在SECTIONS命令中提到, 那么该section将被直接拷贝成输出section.输出section描述输出section描述具有如下格式:SECTION [ADDRESS] [(TYPE)] : [AT(LMA)]{OUTPUT-SECTION-COMMANDOUTPUT-SECTION-COMMAND...} [>REGION] [AT>LMA_REGION] [:PHDR :PHDR ...] [=FILLEXP][ ]内的内容为可选选项, 一般不需要.SECTION:section名字SECTION左右的空白、圆括号、冒号是必须的,换行符和其他空格是可选的.每个OUTPUT-SECTION-COMMAND为以下四种之一,符号赋值语句一个输入section描述直接包含的数据值一个特殊的输出section关键字输出section名字(SECTION):输出section名字必须符合输出文件格式要求,比如:a.out格式的文件只允许存在.text、.data和.bss section名.而有的格式只允许存在数字名字,那么此时应该用引号将所有名字内的数字组合在一起;另外,还有一些格式允许任何序列的字符存在于section名字内,此时如果名字内包含特殊字符(比如空格、逗号等),那么需要用引号将其组合在一起.输出section地址(ADDRESS):ADDRESS是一个表达式,它的值用于设置VMA.如果没有该选项且有REGION选项,那么连接器将根据REGION设置VMA;如果也没有REGION选项,那么连接器将根据定位符号‘.’的值设置该section的VMA,将定位符号的值调整到满足输出section对齐要求后的值,输出section的对齐要求为:该输出section描述内用到的所有输入section的对齐要求中最严格的.例子:.text . : { *(.text) }和.text : { *(.text) }这两个描述是截然不同的,第一个将.text section的VMA设置为定位符号的值,而第二个则是设置成定位符号的修调值,满足对齐要求后的.ADDRESS可以是一个任意表达式,比如ALIGN(0x10)这将把该section的VMA设置成定位符号的修调值,满足16字节对齐后的.注意:设置ADDRESS值,将更改定位符号的值.输入section描述:最常见的输出section描述命令是输入section描述.输入section描述是最基本的连接脚本描述.输入section描述基础:基本语法:FILENAME([EXCLUDE_FILE (FILENAME1 FILENAME2 ...) SECTION1 SECTION2 ...)FILENAME文件名,可以是一个特定的文件的名字,也可以是一个字符串模式.SECTION名字,可以是一个特定的section名字,也可以是一个字符串模式例子是最能说明问题的,*(.text) :表示所有输入文件的.text section(*(EXCLUDE_FILE (*crtend.o *otherfile.o) .ctors)) :表示除crtend.o、otherfile.o文件外的所有输入文件的.ctors section.data.o(.data) :表示data.o文件的.data sectiondata.o :表示data.o文件的所有section*(.text .data) :表示所有文件的.text section和.data section,顺序是:第一个文件的.text section,第一个文件的.data section,第二个文件的.text section,第二个文件的.data section,...*(.text) *(.data) :表示所有文件的.text section和.data section,顺序是:第一个文件的.text section,第二个文件的.text section,...,最后一个文件的.text section,第一个文件的.data section,第二个文件的.data section,...,最后一个文件的.data section下面看连接器是如何找到对应的文件的.当FILENAME是一个特定的文件名时,连接器会查看它是否在连接命令行内出现或在INPUT命令中出现.当FILENAME是一个字符串模式时,连接器仅仅只查看它是否在连接命令行内出现.注意:如果连接器发现某文件在INPUT命令内出现,那么它会在-L指定的路径内搜寻该文件.字符串模式内可存在以下通配符:* :表示任意多个字符? :表示任意一个字符[CHARS] :表示任意一个CHARS内的字符,可用-号表示范围,如:a-z:表示引用下一个紧跟的字符在文件名内,通配符不匹配文件夹分隔符/,但当字符串模式仅包含通配符*时除外.任何一个文件的任意section只能在SECTIONS命令内出现一次.看如下例子,SECTIONS {.data : { *(.data) }.data1 : { data.o(.data) }}data.o文件的.data section在第一个OUTPUT-SECTION-COMMAND命令内被使用了,那么在第二个OUTPUT-SECTION-COMMAND命令内将不会再被使用,也就是说即使连接器不报错,输出文件的.data1 section的内容也是空的.再次强调:连接器依次扫描每个OUTPUT-SECTION-COMMAND命令内的文件名,任何一个文件的任何一个section都只能使用一次.读者可以用-M连接命令选项来产生一个map文件,它包含了所有输入section到输出section的组合信息.再看个例子,SECTIONS {.text : { *(.text) }.DATA : { [A-Z]*(.data) }.data : { *(.data) }.bss : { *(.bss) }}这个例子中说明,所有文件的输入.text section组成输出.text section;所有以大写字母开头的文件的.data section组成输出.DATA section,其他文件的.data section组成输出.data section;所有文件的输入.bss section组成输出.bss section.可以用SORT()关键字对满足字符串模式的所有名字进行递增排序,如SORT(.text*).通用符号(common symbol)的输入section:在许多目标文件格式中,通用符号并没有占用一个section.连接器认为:输入文件的所有通用符号在名为COMMON的section内.例子,.bss { *(.bss) *(COMMON) }这个例子中将所有输入文件的所有通用符号放入输出.bss section内.可以看到COMMOM section的使用方法跟其他section的使用方法是一样的.有些目标文件格式把通用符号分成几类.例如,在MIPS elf目标文件格式中,把通用符号分成standard common symbols(标准通用符号)和small common symbols(微通用符号,不知道这么译对不对?),此时连接器认为所有standard common symbols在COMMON section内,而small common symbols在.scommon section内.在一些以前的连接脚本内可以看见[COMMON],相当于*(COMMON),不建议继续使用这种陈旧的方式.输入section和垃圾回收:在连接命令行内使用了选项--gc-sections后,连接器可能将某些它认为没用的section过滤掉,此时就有必要强制连接器保留一些特定的section,可用KEEP()关键字达此目的.如KEEP(*(.text))或KEEP(SORT(*)(.text))最后看个简单的输入section相关例子:SECTIONS {outputa 0x10000 :{all.ofoo.o (.input1)}outputb :{foo.o (.input2)foo1.o (.input1)}outputc :{*(.input1)*(.input2)}}本例中,将all.o文件的所有section和foo.o文件的所有(一个文件内可以有多个同名section).input1 section依次放入输出outputa section内,该section的VMA是0x10000;将foo.o文件的所有.input2 section和foo1.o文件的所有.input1 section依次放入输出outputb section内,该section的VMA是当前定位器符号的修调值(对齐后);将其他文件(非all.o、foo.o、foo1.o)文件的. input1 section和.input2 section放入输出outputc section内.在输出section存放数据命令:能够显示地在输出section内填入你想要填入的信息(这样是不是可以自己通过连接脚本写程序?当然是简单的程序).BYTE(EXPRESSION) 1 字节SHORT(EXPRESSION) 2 字节LOGN(EXPRESSION) 4 字节QUAD(EXPRESSION) 8 字节SQUAD(EXPRESSION) 64位处理器的代码时,8 字节输出文件的字节顺序big endianness 或little endianness,可以由输出目标文件的格式决定;如果输出目标文件的格式不能决定字节顺序,那么字节顺序与第一个输入文件的字节顺序相同.如:BYTE(1)、LANG(addr).注意,这些命令只能放在输出section描述内,其他地方不行.错误:SECTIONS { .text : { *(.text) } LONG(1) .data : { *(.data) } }正确:SECTIONS { .text : { *(.text) LONG(1) } .data : { *(.data) } }在当前输出section内可能存在未描述的存储区域(比如由于对齐造成的空隙),可以用FILL(EXPRESSION)命令决定这些存储区域的内容,EXPRESSION的前两字节有效,这两字节在必要时可以重复被使用以填充这类存储区域.如FILE(0x9090).在输出section描述中可以有=FILEEXP属性,它的作用如同FILE()命令,但是FILE命令只作用于该FILE指令之后的section区域,而=FILEEXP属性作用于整个输出section区域,且FILE命令的优先级更高!!!输出section内命令的关键字:CREATE_OBJECT_SYMBOLS :为每个输入文件建立一个符号,符号名为输入文件的名字.每个符号所在的section是出现该关键字的section.CONSTRUCTORS :与c++内的(全局对象的)构造函数和(全局对像的)析构函数相关,下面将它们简称为全局构造和全局析构.对于a.out目标文件格式,连接器用一些不寻常的方法实现c++的全局构造和全局析构.当连接器生成的目标文件格式不支持任意section名字时,比如说ECOFF、XCOFF格式,连接器将通过名字来识别全局构造和全局析构,对于这些文件格式,连接器把与全局构造和全局析构的相关信息放入出现CONSTRUCTORS关键字的输出section内.符号__CTORS_LIST__表示全局构造信息的的开始处,__CTORS_END__表示全局构造信息的结束处.符号__DTORS_LIST__表示全局构造信息的的开始处,__DTORS_END__表示全局构造信息的结束处.这两块信息的开始处是一字长的信息,表示该块信息有多少项数据,然后以值为零的一字长数据结束.一般来说,GNU C++在函数__main内安排全局构造代码的运行,而__main函数被初始化代码(在main函数调用之前执行)调用.是不是对于某些目标文件格式才这样???对于支持任意section名的目标文件格式,比如COFF、ELF格式,GNU C++将全局构造和全局析构信息分别放入.ctors section和.dtors section内,然后在连接脚本内加入如下,__CTOR_LIST__ = .;LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)*(.ctors)LONG(0)__CTOR_END__ = .;__DTOR_LIST__ = .;LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)*(.dtors)LONG(0)__DTOR_END__ = .;如果使用GNU C++提供的初始化优先级支持(它能控制每个全局构造函数调用的先后顺序),那么请在连接脚本内把CONSTRUCTORS替换成SORT (CONSTRUCTS),把*(.ctors)换成*(SORT(.ctors)),把*(.dtors)换成*(SORT(.dtors)).一般来说,默认的连接脚本已作好的这些工作.输出section的丢弃:例子,.foo { *(.foo) },如果没有任何一个输入文件包含.foo section,那么连接器将不会创建.foo输出section.但是如果在这些输出section描述内包含了非输入section描述命令(如符号赋值语句),那么连接器将总是创建该输出section.有一个特殊的输出section,名为/DISCARD/,被该section引用的任何输入section将不会出现在输出文件内,这就是DISCARD的意思吧.如果/DISCARD/ section被它自己引用呢?想想看.输出section属性:终于讲到这里了,呵呵.我们再回顾以下输出section描述的文法:SECTION [ADDRESS] [(TYPE)] : [AT(LMA)]{OUTPUT-SECTION-COMMANDOUTPUT-SECTION-COMMAND...} [>REGION] [AT>LMA_REGION] [:PHDR :PHDR ...] [=FILLEXP]前面我们浏览了SECTION、ADDRESS、OUTPUT-SECTION-COMMAND相关信息,下面我们将浏览其他属性.TYPE :每个输出section都有一个类型,如果没有指定TYPE类型,那么连接器根据输出section引用的输入section的类型设置该输出section的类型.它可以为以下五种值,NOLOAD :该section在程序运行时,不被载入内存.DSECT,COPY,INFO,OVERLAY :这些类型很少被使用,为了向后兼容才被保留下来.这种类型的section必须被标记为“不可加载的”,以便在程序运行不为它们分配内存.输出section的LMA :默认情况下,LMA等于VMA,但可以通过关键字AT()指定LMA.用关键字AT()指定,括号内包含表达式,表达式的值用于设置LMA.如果不用AT()关键字,那么可用AT>LMA_REGION表达式设置指定该section加载地址的范围.这个属性主要用于构件ROM境象.例子,SECTIONS{.text 0x1000 : { *(.text) _etext = . ; }.mdata 0x2000 :AT ( ADDR (.text) + SIZEOF (.text) ){ _data = . ; *(.data); _edata = . ; }.bss 0x3000 :{ _bstart = . ; *(.bss) *(COMMON) ; _bend = . ;}}程序如下,extern char _etext, _data, _edata, _bstart, _bend;char *src = &_etext;char *dst = &_data;/* ROM has data at end of text; copy it. */while (dst < &_edata) {*dst++ = *src++;}/* Zero bss */for (dst = &_bstart; dst< &_bend; dst++)*dst = 0;此程序将处于ROM内的已初始化数据拷贝到该数据应在的位置(VMA地址),并将为初始化数据置零.读者应该认真的自己分析以上连接脚本和程序的作用.输出section区域:可以将输出section放入预先定义的内存区域内,例子,MEMORY { rom : ORIGIN = 0x1000, LENGTH = 0x1000 }SECTIONS { ROM : { *(.text) } >rom }输出section所在的程序段:可以将输出section放入预先定义的程序段(program segment)内.如果某个输出section设置了它所在的一个或多个程序段,那么接下来定义的输出section的默认程序段与该输出section的相同.除非再次显示地指定.例子,PHDRS { text PT_LOAD ; }SECTIONS { .text : { *(.text) } :text }可以通过:NONE指定连接器不把该section放入任何程序段内.详情请查看PHDRS命令输出section的填充模版:这个在前面提到过,任何输出section描述内的未指定的内存区域,连接器用该模版填充该区域.用法:=FILEEXP,前两字节有效,当区域大于两字节时,重复使用这两字节以将其填满.例子,SECTIONS { .text : { *(.text) } =0x9090 }覆盖图(overlay)描述:覆盖图描述使两个或多个不同的section占用同一块程序地址空间.覆盖图管理代码负责将section的拷入和拷出.考虑这种情况,当某存储块的访问速度比其他存储块要快时,那么如果将section拷到该存储块来执行或访问,那么速度将会有所提高,覆盖图描述就很适合这种情形.文法如下,SECTIONS {...OVERLAY [START] : [NOCROSSREFS] [AT ( LDADDR )]{SECNAME1{OUTPUT-SECTION-COMMANDOUTPUT-SECTION-COMMAND...} [:PHDR...] [=FILL]SECNAME2{OUTPUT-SECTION-COMMANDOUTPUT-SECTION-COMMAND...} [:PHDR...] [=FILL]...} [>REGION] [:PHDR...] [=FILL]...}由以上文法可以看出,同一覆盖图内的section具有相同的VMA.SECNAME2的LMA为SECTNAME1的LMA加上SECNAME1的大小,同理计算SECNAME2,3,4...的LMA.SECNAME1的LMA由LDADDR 决定,如果它没有被指定,那么由START决定,如果它也没有被指定,那么由当前定位符号的值决定.NOCROSSREFS关键字指定各section之间不能交叉引用,否则报错.对于OVERLAY描述的每个section,连接器将定义两个符号__load_start_SECNAME和__load_stop_SECNAME,这两个符号的值分别代表SECNAME section的LMA地址的开始和结束.连接器处理完OVERLAY描述语句后,将定位符号的值加上所有覆盖图内section大小的最大值.看个例子吧,SECTIONS{...OVERLAY 0x1000 : AT (0x4000){.text0 { o1/*.o(.text) }.text1 { o2/*.o(.text) }}...}.text0 section和.text1 section的VMA地址是0x1000,.text0 section加载于地址0x4000,.text1 section紧跟在其后.程序代码,拷贝.text1 section代码,extern char __load_start_text1, __load_stop_text1;memcpy ((char *) 0x1000, &__load_start_text1,&__load_stop_text1 - &__load_start_text1);8. 内存区域命令---------------注意:以下存储区域指的是在程序地址空间内的.在默认情形下,连接器可以为section分配任意位置的存储区域.你也可以用MEMORY命令定义存储区域,并通过输出section描述的> REGION属性显示地将该输出section限定于某块存储区域,当存储区域大小不能满足要求时,连接器会报告该错误.MEMORY命令的文法如下,MEMORY {NAME1 [(ATTR)] : ORIGIN = ORIGIN1, LENGTH = LEN2NAME2 [(ATTR)] : ORIGIN = ORIGIN2, LENGTH = LEN2...}NAME :存储区域的名字,这个名字可以与符号名、文件名、section名重复,因为它处于一个独立的名字空间.ATTR :定义该存储区域的属性,在讲述SECTIONS命令时提到,当某输入section没有在SECTIONS命令内引用时,连接器会把该输入section直接拷贝成输出section,然后将该输出section放入内存区域内.如果设置了内存区域设置了ATTR属性,那么该区域只接受满足该属性的section(怎么判断该section是否满足?输出section描述内好象没有记录该section的读写执行属性).ATTR属性内可以出现以下7个字符,R 只读sectionW 读/写sectionX 可执行sectionA ‘可分配的’sectionI 初始化了的sectionL 同I! 不满足该字符之后的任何一个属性的sectionORIGIN :关键字,区域的开始地址,可简写成org或oLENGTH :关键字,区域的大小,可简写成len或l例子,MEMORY{rom (rx) : ORIGIN = 0, LENGTH = 256Kram (!rx) : org = 0x40000000, l = 4M}此例中,把在SECTIONS命令内*未*引用的且具有读属性或写属性的输入section放入rom区域内,把其他未引用的输入section放入ram.如果某输出section要被放入某内存区域内,而该输出section又没有指明ADDRESS属性,那么连接器将该输出section放在该区域内下一个能使用位置.9. PHDRS命令------------该命令仅在产生ELF目标文件时有效.ELF目标文件格式用program headers程序头(程序头内包含一个或多个segment程序段描述)来描述程序如何被载入内存.可以用objdump -p命令查看.当在本地ELF系统运行ELF目标文件格式的程序时,系统加载器通过读取程序头信息以知道如何将程序加载到内存.要了解系统加载器如何解析程序头,请参考ELF ABI文档.在连接脚本内不指定PHDRS命令时,连接器能够很好的创建程序头,但是有时需要更精确的描述程序头,那么PAHDRS命令就派上用场了.注意:一旦在连接脚本内使用了PHDRS命令,那么连接器**仅会**创建PHDRS命令指定的信息,所以使用时须谨慎.。

STSF8300激光二极管驱动器和TEC控制器用户手册说明书

STSF8300激光二极管驱动器和TEC控制器用户手册说明书

STSF8300Laser Diode Driver with TEC Controller for Butterfly LD Type 1 PumpDatasheet & User ManualBefore powering on your driver, read this manual thoroughly.If you have any doubt or suggestion, please do not hesitate to contact us!Table of contentTable of content (2)ser diode driver features (3)2.Applications (3)3.TEC controller features (3)4.Controls (3)5.Description (3)6.Package set (3)7.Overall dimensions and weight (3)8.Versions (4)9.Absolute maximum ratings (4)10.Recommended operating conditions (4)11.Power supply requirements (4)12.Electrical characteristics (4)13.Typical Performance Characteristics (5)14.Functional scheme (6)15.Pin and terminal functions (7)16.Analogue control description (10)17.Current / Temperature setting variants (11)18.How to get started (12)19.Cooling (13)20.Internal protections (13)21.Software (14)22.Digital control description (14)23.Digital control description (extended) (18)24.Troubleshooting guide (21)25.Mechanical dimensions (22)ser diode driver features∙Constant current mode∙Low current ripple ≤ 10uA∙Current stability 0.1%∙No need to adjust voltage∙Soft-start∙Adjustable current limit∙Reverse current protection∙Crowbar circuit protection∙Own software2.Applications∙Supplying laser diodes in butterfly case 3.TEC controller features∙Low current ripple≤2mA∙Integrated PID controller, doesn't require setup∙Adjustable TEC output current limit∙Working with sensor NTC 10kOhm∙Additional NTC thermistor input4.Controls∙Potentiometers on the board∙External input∙Digital control by RS-232/UART/USB15.DescriptionSTSF8300contains a laser diode driver and a temperature controller (TEC).Laser diode driver is a non isolated low drop out (LDO) regulator with constant current output. Driver produces high stability and low ripple current.TEC is a non isolated DC/DC. TEC produces low current ripples. Additional features include an adjustable TEC output current limit and Integrated self-adjusted PID controller, providing optimal temperature regulation.STSF8300 can be controlled by analogue or digital signals and switches on the board.STSF8300 is housed in 61 × 101.6 mm package with aluminum base plate to aid thermal dissipation from laser diode. The laser diode mount is located on the board. Driver can be mounted on any thermal conductive surface enough to dissipate laser diode losses.6.Package set∙Driver – 1 pcs∙50 cm ribbon cable with one 8-pin connector – 1 pcs∙50 cm ribbon cable with one 20-pin connector – 1 pcs∙Datasheet & User Manual – 1 pcs∙USB-UART converter – 1 pcs (for ZIF versions)7.Overall dimensions and weight1 Option, USB as external adapter8.Versions9.Absolute maximum ratingsStresses beyond those listed under absolute maximum ratings may cause permanent damage to the device. These are stress ratings only, which do not imply functional operation of the device at these or any other conditions beyond those indicated under recommended operating conditions. Exposure to absolute-maximum-rated conditions for extended periods may affect device reliability.10.Recommended operating conditions11.Power supply requirementsThe driver requires a 5V DC power supply. The power supply must be able to cover the driver and TEC output power and losses. The power supply must provide 40W or more. Power supply used during tests: SE-100-5.12.Electrical characteristics13.Typical Performance CharacteristicsmA/divms/divFig. 1 –Typical start up sequence Fig. 2 – Typical stop sequence14.Functional schemeAnalogue interface15. Pin and terminal functionsPlease, note polarity!Never ground any lead of the output, this may cause permanent damage to the laser diode and the driver!Never use any grounded probes (e.g. from the oscilloscope) at the output! Control pins are not isolated!Fig. 7 – ControlsSINTEC SINTECSINTECSINTEC OPTRONICS, http://www.sintec.sgDigital control connectorWurth WR-MM 690157000872 or TE Connectivity 215083-8Analogue control connectorWurth WR-MM 690157002072 or TE Connectivity 2-215083-0PIN I/O Name Description1 O +5V Connected to Vin+.2 I TEC Enable HIGH = operates, LOW = stop. Internally pulled down.3 I Laser Driver Enable HIGH = operates, LOW = stop. Internally pulled down.4 O TEC Error HIGH = fault, LOW = normal operation.5 O Laser Driver Overcurrent HIGH = fault, LOW = normal operation.6 O +2.5V Auxiliary +2.5V power supply.Up to 10mA output current capability.7 I Laser Current Set 0-2.5V = 0-MAX current at the output.8 GND9 I TEC temperature set 0V = 42°C, 2.5V = 16°C.SINTEC OPTRONICS, http://www.sintec.sg Laser diode pinout№Description №Description16.Analogue control descriptionser Driver Enable / TEC EnableThe "Enable" contacts are logic inputs.Apply high level to «TEC Enable»pin to start temperature stabilization. Apply low level to «TEC Enable»pin to stop temperature stabilization.Apply high level to «Laser Driver Enable»pin to initiate soft-start sequence of laser diode driver. Apply low level to «Laser Driver Enable»pin to stop the driver.The enable features are duplicated with on-off switches located on the board (7 in Fig. 7).16.2.TEC ErrorThe «TEC Error» contact is logic output.TEC error signal generates in overcurrent, short-circuit or circuitry overheat condition.If an error occurs «TEC Error» pin becomes high.A TEC error stops the laser driver. To reset the error, restart the device.ser Driver OvercurrentThe «Laser Driver Overcurrent»contact is logic output.The «Laser Driver Overcurrent»pin is intended for monitoring the status of the protection circuits. When the current protection is activated, the laser driver stops, the output terminals are shunted, the LED on the board lights up red. The high logic level in the contact indicates the presence of shunting of the output terminals. The current generator cannot be restarted after the protection has tripped. To reset the protection, restart the driver.16.4.Reference voltage 2.5VThe «+2.5V»pin is intended for supplying a reference voltage to external potentiometers etc., which may be used for current and temperature setting.ser Current SetThe «Laser Current Set»pin is an analog input.The «Laser Current Set»is intended for setting the driver output current amplitude. Apply voltage to the «Laser Current Set»with respect to GND to control the output current. Signal resolution depends on driver model, maximum amplitude of the signal is 2.5V.The «Laser Current Set»pin can be used for analogue modulation by applying sign, square or ramp signal with the DC component. Please, control the output current while using this feature. In this case, the value of the DC component determines the average current in the load, and the amplitude of the signal determines the modulation amplitude. It is necessary to ensure that the current for analog modulation does not exceed the current protection threshold. Analogue modulation amplitude depends on frequency.ATTENTION! If you use arbitrary/function generator or lab PS for current set, make sure it is in High Z mode, please, control the current set and current monitor pin voltages while getting started. When you using a generator with an output "50 Ohms", the value on the screen of the device can be less than the actually set 2 times. Be careful, monitor the voltage on the contact «Laser Current Set»with an oscilloscope.16.6. TEC temperature setThe «TEC temperature set» pin is an analog input.The «TEC temperature set» is intended for setting the desired temperature of laser module. Apply voltage to the «TEC temperature set» with respect to GND To set the desired temperature.The applied voltage must correspond to the desired resistance of the thermistor.Thespecified voltage U [V] is related to the resistance of the thermistor R [Ohm] by the formula:For example, to obtain a thermistor resistance of 10000 Ohm, a voltage of 1.25 V must be applied to the «TEC temperature set» pin. The 10 kOhm resistance corresponds to 25 ° C for the NTC thermistor 10k. A lower input voltage corresponds to a lower resistance of the thermistor (higher temperature) and vice versa.When translating the resistance of the thermistor to the temperature t [° C], it is necessary to consider the coefficient B25 / 100 [K], specified in the manufacturer's specifications:16.7. Driver current monitorThe output current of the driver can be monitored by current monitor.16.8. TEC temperature monitorThe «TEC temperature monitor » pin is an analog output and allows to track the temperature of the laser diode.Proportions described in paragraph 16.6 are valid for this Pin.16.9. NTC Interlock (External thermistor connection)This allows to measure the temperature of a laser diode or other devices. The measurement result is readable by the digital interface. You can set upper and lower limits of the temperature using the digital interface (with command or software). If the temperature goes beyond the limits, the driver operation is blocked. When the temperature returns to the specified range, the driver operation resumes. After setting, limits will be saved in device memory and will work when used both digital and analogue control.17. Current / Temperature setting variantsParameters can be set in three ways: using potentiometer, analog control connector or digital commands. Signal sources for current and temperature can be set independently of each other.18.How to get startedUnpack the device. The new device is configured with the following values:For the first time we recommended to connect a dummy load. You can use any diodes that are suitable for the current you want to operate. Dummy load should be connected as load. LD+ to the anode and LD- to the cathode.Please don’t turn on TEC if you have not connected a dummy load to the TEC pins.Connect the controls (analogue and/or digital).Connect the power supply (note polarity).18.1.InterlockThe driver has interlock. This is pin 15 of the analog control connector. If you left this pin open the driver is in the locked state. This pin must be connected to any GND pin for normal operation.The driver and the temperature controller can only be turned on with shorted Interlock.You can also connect something like an emergency button to this pin.By default at power up the driver is in the "allow interlock" state.Via USB you can set the driver to the "deny interlock" state. At this case the driver will ignore interlock state and can operate with opened pin 15.18.2.NTC InterlockThe driver can only be turned on with installed LD. When driver turn on without the installed LD, the operation and measure values will be incorrect! If it is necessary to turn on the driver without the installed LD, connect 10kOhm resistor to thermistor pins (2nd and 5th) on LD mount.18.3.Change the current limit on the Peltier moduleIf it is necessary, the level of current limit on the Peltier module can be changed before connecting the laser diode using digital control connection (see paragraph 20).18.4.Change the current protection threshold of the driverIf it is necessary, the current protection threshold can be changed before connection of a laser diode. Make sure that the jumper DRIVER SHORT is installed. CURRENT control selector must be in the INT position to use the CURRENT potentiometer.Connect the me asuring instrument to the «Driver Current Monitor» pin.If it is necessary to increase the limitation level, turn the potentiometer DRV OC clockwise for a few turns.Turn on the driver. Set the current equal to the desired current protection threshold withthe potentiometer CURRENT. Then slowly turn the potentiometer DRV OC counterclockwise untilthe protection is activated. Restart the driver to reset an error. Make sure that the protection is triggered at the correct current lever.Set current to zero, turn off the driver.18.5.How to control by digital signalsUse the digital control connector. You can use UART or RS-232. The USB-UART converter canbe used (optional) to connect the device to computer.See paragraphs 22-23.18.6.How to control by analogue signalsCURRENT and TEC control selectors must be in the EXT position.Use the analogue control connector.If you connect pins 2 and 3 to pin 1 (5V) before power up the device, the driver will not turn on.See paragraph 16.18.7.How to control by board switchesCURRENT and TEC control selectors must be in the INT position.Use two-position switch to start/stop laser diode driver or temperature stabilization. If youset onboard switch to ON before power up the device, the driver will not turn on.Turn CURRENT potentiometer (9 in Fig. 7) clockwise to increases the value of driver output current amplitude, counterclockwise – to reduce.Turn TEC potentiometer (10 in Fig. 7) clockwise to increases the desired temperature of laser module, counterclockwise – to reduce.19.CoolingThe board does not require active cooling. Aluminum mount is designed to remove heatfrom the laser diode.20.Internal protectionsThe device provides several security features to ensure the safety of the laser module.The jumper shunts the outputs of driver, to protect the laser diode from static dischargeswhile installing.Before installing the laser module on the board, make sure there is a jumper! Remove the jumper before turning on the driver.Reverse diode protects the laser diode from reverse current and reverse voltage.In case of an over-current or an over temperature condition, the control logic disables the driverand the output shorts with 2 mOhm shunt. Setting the current protection threshold is described in paragraph 18. The current protection threshold must be less than the laser module absolute maximum ratings.The TEC current limit allows setting the maximum current safe for the Peltier module.21.SoftwareWe offer own software to control driver. You can find it at in the ************************************************************************.22. Digital control descriptionWhen the input voltage applied the driver is always in "analogue parameters set, external enable and allowing interlock" state. Any other state should be set any time after powering the driver if needed.Data exchange between the driver and the PC is only initiated by the PC. All commands are sent in plain text format.All commands in text-plain mode should be in ASCII. All commands are sent with prefix. Number of command follows the prefix without any symbols. If there is the value after the command they separates with "space" symbol. The command ends with "carriage return" symbol.The device does not respond to P-type commands by default (see section "the protocol extension").You can request the value of parameter by the J-type command. The device will return a value of requested parameter.If the device could not recognize a command, it returns an error message with error code. The format and codes of errorsAvailable parameters and its description2 Default – 100.00% (2710h), calibration range is from 95.00% (251Ch) to 105.00% (2904h).3 Common for driver and TEC.4 If temperature of the device reaches the over temperature warning threshold the overheat flag will be set. If the device is in over temperature protection state, then it will be set overheat and over current flags together.The maximum duration depends on the set value of the frequency. When you change frequency, a new value of the maximum duration is compute automatically. The duration of pulse cannot be less than 2 ms and more than period of frequency minus 2 ms. For low frequencies the duration cannot be more than 5000 ms.Set the zero frequency to switch the device into CW mode or set not zero frequency value to switch the device into QCW (long pulses) mode. If you try to set a value more or less than limits, then the value will be rounded to limit. Any attempts to set a new state of the device, except “start”, forcibly switch the device to the state “stop”.Some states of the device are mutually exclusive, for example, if you set “Ext. Enable”, then you will not be abl e to set the state “start”. If you send “start” and “stop” commands to each other, the device will save all parameters in the internal memory. The saving process lasts about 300 ms. In this time the device does not respond to any actions. The device is able to save the next parameters in the internal memory: ∙Frequency with limits;∙Duration with limits;∙Current with limits and calibration;∙Temperature limits and B25/100;∙Settings of the RS protocol extension (see section «Digital control description (extended)»).5 Default – 100.00% (2710h), calibration range is from 95.00% (251Ch) to 105.00% (2904h).23.Digital control description (extended)WARNING! Extended protocol recommend for advanced users only. In addition, it might be use for integration of the device with other devices.Use the parameter number 0704h for configure the extended protocol. In extended protocol, you can enable and disable the next options: checksum (CRC 8-bit CCITT), return a new value of parameter after P-type commands, change baud-rate, change protocol-mode (text-plain or binary).6 In binary mode the specified commands are ignored by the device.7 Here are binary numbers.8For more information, see section “binary mode”.Text-plain modeAll commands in text-plain mode should be in ASCII.WARNING! If you enable the checksum it will change format of commands. After <CR> symbol you will be write 2 bytes of checksum and last byte will be <LF> (0Ah –“new line” symbol).Checksum is computed for all bytes of command before checksum bytes (including<CR> symbol).All answers of the device will also contain a checksum, including K-type and E-type answers.Checksum is computed by CRC-CCITT-8 algorithm. This is the main difference between the format of commands for the extended protocol and standard protocol.The format of commands for enabled checksumPossible problems1.The device waiting for symbol <LF>. If <LF> symbol does not received and buffer is overflowed,then all symbols after overload will be processed as a new command. The device returns an error. In this case, it is recommended to send the <LF> symbol. The device will generate an error and clear the buffer for the next command.2.All symbols after the <LF> symbol will be processed as a new command.Binary modeThe binary mode has a significant difference. In this mode, data are exchanged in binary form. Length of any type of command is 8 bytes! In this mode, next options are always enable and you cannot disable it: return a new value of parameter for P-type commands and checksum. The format of binary mode commands is represented in table 8.24.Troubleshooting guide25.Mechanical dimensionsAll dimensions are in millimeters. You can download the 3D-model of the driver at in the downloads section of the product page.25.1.SF8xxx-10 model for soldering 10-pin Butterfly25.2.SF8xxx-14 model for soldering 14-pin Butterfly25.3.SF8xxx-ZIF10 model with Azimuth connectors for 10-pin Butterfly25.4.SF8xxx-ZIF14 model with Azimuth connectors for 14-pin Butterfly。

FTDI 驱动程序安装指南说明书

FTDI 驱动程序安装指南说明书

Application NoteAN_220FTDI Drivers Installation Guide forLinuxVersion 2.1Issue Date: 2017-06-07The purpose of this application note is to provide users of FTDI chips with asimple procedure to install FTDI drivers for FTDI devices used with Linux.Use of FTDI devices in life support and/or safety applications is entirely at the user’s risk, and the user agrees to defend, indemnify and hold FTDI harmless from any and all damages, claims, suitsor expense resulting from such use.Future Technology Devices International Limited (FTDI)Table of Contents1Introduction (2)1.1Overview (2)2Installing the D2XX driver (3)2.1Linux Shared Object and Static Library Install (3)2.1.1Native Compiling (4)2.1.2Cross Compiling (4)3Compiling and Running Sample D2XX Applications (5)3.1Building and Running the Shared Object Examples (5)3.2Building and Running the Static Library Example (5)4Contact Information (7)Appendix A – References (8)Document References (8)Acronyms and Abbreviations (8)Appendix B – List of Tables & Figures (9)List of Tables (9)List of Figures (9)Appendix C – Revision History (10)1IntroductionThe purpose of this application note is to provide users of FTDI chips with a simple procedure to install FTDI drivers for FTDI devices using Linux.1.1OverviewFTDI has two types of drivers for all supported operating systems. These are the virtual COM port driver (VCP) and the D2XX API driver. Since the FTDI VCP driver is built into the Linux kernel, this document will focus on the installation of the D2XX driver.To ensure all FTDI devices have VCP driver support, FTDI recommends installing the latest kernel release on the Linux system. In Linux, the VCP drivers will appear as /dev/ttyUSBx.How to verify the built-in COM port:∙Plug in an FTDI based design/module/cable∙Open a terminal window, and enterdmesg | grep FTDI∙The output on the terminal window should contain the following:[10170.987708] USB Serial support registered for FTDI USB Serial Device[10170.987915] ftdi_sio 9-1:1.0: FTDI USB Serial Device converter detected[10170.991172] usb 9-1: FTDI USB Serial Device converter now attached to ttyUSB0[10170.991219] ftdi_sio: v1.6.0:USB FTDI Serial Converters DriverIn Linux, the VCP driver and D2XX driver are incompatible with each other. When a FTDI device is plugged in, the VCP driver must be unloaded before a D2XX application can be run. Use the remove module (rmmod) command to do this:sudo rmmod ftdi_siosudo rmmod usbserialWhen the FTDI device is power cycled or reset the VCP driver will be reloaded. The rmmod process must be repeated each time this occurs. It is possible to write a simple script that unloads the VCP driver before running the D2XX application.2Installing the D2XX driverDownload a suitable Linux D2XX driver from the FTDI D2XX driver web page. The driver files are contained in a tar gzip file.Each CPU architecture has a separate driver file. The options are:x86 – for 32-bit IA-32 CPUs,x64 – for 64-bit Intel-64 (x86-64) CPUs,ARM – for ARM CPUs, choice of hard-float, soft-float.MIPS32 – choice of hard-float and soft-float.Note that the ARM architecture is backward compatible but v5, v6 and v7 options are available. The ARM v6 driver is suitable for Raspberry Pi.The archives contain the D2XX driver and directory of sample code. Most Linux distributions have utilities for extracting tar gzip archive files, such as the Archive Manager in Ubuntu. Figure 2.1 shows a screen capture showing the contents of the tar gzip archive.The version number is used in the driver file names and will change on each release. In this document it is assumed to be version 1.1.12 and in the instructions the version number is italicized. Replace the version number with the version numbers used in the release.It is possible to have multiple versions of the driver co-existing on a single system allowing control over which versions to use for an application.Click on Extract and save all the files to your desired target directory.Figure 2.1 Contents of D2XX driver archiveAs an alternative, you can use the Linux gunzip and tar commands to extract the driver files. Open a Linux terminal window and enter:gunzip libftd2xx1.1.12.tar.gztar –xvf libftd2xx1.1.12.tar2.1Linux Shared Object and Static Library InstallOpen a Linux terminal window at the location where the driver files were extracted.2.1.1Native CompilingIn this section the driver statically linked libraries and shared objects are copied to the /usr/local/lib area for use by the native compiler.All driver files are copied and symbolic links created using the Linux sudo command for root permissions.sudo cp /releases/build/lib* /usr/local/libMake the following symbolic links and permission modifications in /usr/local/lib:cd /usr/local/libsudo ln –s libftd2xx.so.1.1.12 libftd2xx.sosudo chmod 0755 libftd2xx.so.1.1.12The symbolic link is used to select a default driver file. Any program can be linked against a specific version of the library by using a version numbered library file.2.1.2Cross CompilingTo use the driver when cross compiling it must be copied to a suitable library path used by the cross compiler. There are several options for this depending on the cross compiler and user preferences.In this section the path to run the cross compiler will replace the phrase “arch-gcc” in commands. The compiler library search path can be found by running the compiler gcc utility with the “-print-search-dirs” option only. The following command will format the output for display.arch-gcc -print-search-dirs | grep libraries | sed 's/:/\n/g'The output is a list of library search paths (in order) where the driver files can be placed and they will be found automaticall y by the cross compiler. Typically these are in the “/opt” area. Often one directory will end in “/usr/lib”, if this exists then this would be the preferred location.Alternatively they can be installed at an arbitrary location such as /usr/local/arch/lib. The path does not need to be on the libraries search path.In the commands following, the full path to the library directory will be written as “arch-lib”.sudo cp /releases/build/lib* arch-libcd arch-libsudo ln –s libftd2xx.so.1.1.12 libftd2xx.sosudo chmod 0755 libftd2xx.so.1.1.12The example code assumes a native compilation environment and therefore needs to be updated to reflect the new location of the libraries and path of the cross compiler.Within the examples directory there are 2 files which need modified.The “Makefile” will need modified to change the “CC” definition to point to the cross compiler.CC=arch-gccThe “Rules.make” file will also need modified to change the “CC” definition to point to the cross compiler and if the driver files are not placed in the library search path then the location added as a rpath. Note the comma after “-Wl”.CC=arch-gccCFLAGS=-Wall -Wextra -L. -lftd2xx -lpthread -ldl -lrt -Wl,-rpath,arch-libIf the driver files are incorrectly installed or the linker cannot find them on the search path then the error message “ld: cannot find -lftd2xx” will be reported.3Compiling and Running Sample D2XX ApplicationsFTDI provides both Shared Object (.so) and Static linked (.a) D2XX libraries. Here are the installation procedures for these libraries on native systems.3.1Building and Running the Shared Object ExamplesTo verify the D2XX driver install, compile and run the EEPROM read sample program. Make sure the Linux system has the gcc compiler installed.cd release/examplesCompile and link the examples.make –BChange to the read example directory.cd eeprom/readThe name of the executable file is read.Plug in the FTDI based device. Remove the VCP driver as described in section 1.1: sudo rmmod ftdi_siosudo rmmod usbserialRun the sample application:sudo ./readThe read application will list the configuration descriptors of the attached FTDI device as follows: opening port 0ftHandle0 = 0x8e89220Signature1 = 0Signature2 = -1Version = 2VendorId = 0x0403ProductId = 0x6001Manufacturer = FTDIManufacturerId = FTDescription = USB-Serial ConverterSerialNumber = FTG5FL9U3.2Building and Running the Static Library ExampleThe static library example is simple to run and execute.cd release/examples/staticRemove any previous library built for another target.rm lib*Copy the static library to current directory from the copy in the driver distribution file. This could also be copied from /usr/local/lib or the cross compiler library used in section 2.1.2.cp ../../build/libftd2xx.a .Compile and link the example.make –B <ret>Run the test program.sudo ./static_linkThis application will write and read 16 bytes to port 0 of any FTDI USB ->UART device with a loopback connector attached:Device 0 Serial Number - FTVESNIOOpened device FTVESNIOFT_Read read 16 bytesClosed device FTVESNIO4Contact InformationHead Office – Glasgow, UKFuture Technology Devices International LimitedUnit 1, 2 Seaward Place, Centurion Business Park Glasgow G41 1HHUnited KingdomTel: +44 (0) 141 429 2777Fax: +44 (0) 141 429 2758E-mail (Sales) *******************E-mail (Support) *********************E-mail (General Enquiries) *******************Branch Office – Taipei, TaiwanFuture Technology Devices International Limited (Taiwan)2F, No. 516, Sec. 1, NeiHu RoadTaipei 114Taiwan , R.O.C.Tel: +886 (0) 2 8797 1330Fax: +886 (0) 2 8751 9737E-mail (Sales) **********************E-mail (Support) ************************ E-mail (General Enquiries) **********************Branch Office – Tigard, Oregon, USAFuture Technology Devices International Limited (USA)7130 SW Fir LoopTigard, OR 97223-8160USATel: +1 (503) 547 0988Fax: +1 (503) 547 0987E-Mail (Sales) *********************E-Mail (Support) *********************** E-Mail (General Enquiries) *********************Branch Office – Shanghai, ChinaFuture Technology Devices International Limited (China)Room 1103, No. 666 West Huaihai Road,Shanghai, 200052ChinaTel: +86 21 62351596Fax: +86 21 62351595E-mail (Sales) *********************E-mail (Support) *********************** E-mail (General Enquiries) *********************Web SiteDistributor and Sales RepresentativesPlease visit the Sales Network page of the FTDI Web site for the contact details of ourdistributor(s) and sales representative(s) in your country.System and equipment manufacturers and designers are responsible to ensure that their systems, and any Future TechnologyDevices International Ltd (FTDI) devices incorporated in their systems, meet all applicable safety, regulatory and system-level performance requirements. All application-related information in this document (including application descriptions, suggestedFTDI devices and other materials) is provided for reference only. While FTDI has taken care to assure it is accurate, thisinformation is subject to customer confirmation, and FTDI disclaims all liability for system designs and for any applicationsassistance provided by FTDI. Use of FTDI devices in life support and/or safety applications is entirely at the user’s risk, and theuser agrees to defend, indemnify and hold harmless FTDI from any and all damages, claims, suits or expense resulting from such use. This document is subject to change without notice. No freedom to use patents or other intellectual property rights isimplied by the publication of this document. Neither the whole nor any part of the information contained in, or the productdescribed in this document, may be adapted or reproduced in any material or electronic form without the prior written consentof the copyright holder. Future Technology Devices International Ltd, Unit 1, 2 Seaward Place, Centurion Business Park,Glasgow G41 1HH, United Kingdom. Scotland Registered Company Number: SC136640Appendix A – ReferencesDocument ReferencesAN_146 USB Hardware Design Guides for FTDI ICs Acronyms and AbbreviationsAppendix B – List of Tables & FiguresList of TablesNAList of FiguresFigure 2.1 Contents of D2XX driver archive (3)Application NoteAN_220 FTDI Drivers Installation Guide for LinuxVersion 2.1Document Reference No.: FT_000723 Clearance No.: FTDI# 30210 Product Page Document FeedbackCopyright © Future Technology Devices International Limited Appendix C – Revision History Document Title: AN_220 FTDI Drivers Installation Guide for LinuxDocument Reference No.: FT_000723 Clearance No.: FTDI# 302Product Page: /FTProducts.htmDocument Feedback:Send Feedback。

逻辑取及线圈驱动指令

逻辑取及线圈驱动指令

逻辑取及线圈驱动指令
规律取及线圈驱动指令为LD(Load)、LDN(Load Not)和=(Out)。

LD(Load):取常开触点指令。

用于网络块规律运算开头的常开触点与母线的连接。

LDN(Load Not):取常闭触点指令。

用于网络块规律运算开头的常闭触点与母线的连接。

=(Out):线圈驱动指令。

图1所示为上述三条指令的用法。

(a)梯形图(b)语句表
图1规律取及线圈驱动指令
使用说明:
(1)LD、LDN指令不只是用于网络块规律计算开头时与母线相连的常开和常闭触点,在分支电路块的开头也要使用LD、LDN指令,与后面要讲的ALD、OLD指令协作完成块电路的编程。

(2)由于输入继电器的状态唯一的由输入端子的状态打算,在程序中是不能被转变的,所以“=”指令不能用于输入继电器。

(3)并联的“=”指令可连续使用任意次。

(4)在同一程序中不要使用双线圈输出,即同一个元器件在同一程序中只使用一次“=”指令。

否则可能会产生不盼望的结果。

(5)LD、LDN指令的操作数为:I、Q、M、SM、T、C、V、S、L。

“=”
指令的操作数为:Q、M、S、V、S、L。

T和C也作为输出线圈,但在S7—200 plc中输出时不以使用“=”指令形式消失,而是采纳功能块(见定时器和计数器指令)。

iDrive TM lite LED驱动器产品简介说明书

iDrive TM lite LED驱动器产品简介说明书

Product OverviewThe powerful new i Drive TM lite LED driver is designed to optimize the performance of high power lighting fixtures using high power LEDs including Luxeon TM.The patented i Drive TM lite technology enables excellent colour matching and 100% smooth dimming with precise DC current control combined with advanced automatic heat management system to enhance the long life of both fixtures and LED boards. The 55 Watt system provides a universal voltage input with both UL and CE approvals so you can install them in practically any location.The i Drive TM lite has been designed to make installation simple and to save time by using standard power and DMX connectors with a unique user interface to control all i Drive TM lite functions. There are no complicated DIP switches!The patented thermal control of attached LED boards, using our unique Colour Cool TM Technology, optimises your LED installation for any environment.i Drive TM lite can be controlled by DMX512, or use the hundreds of pre-programmed settings to provide independent scenes, colour combinations and effects.Features•Compact size and rugged construction with standard5-pin XLR DMX in/out connectors.•Universal voltage input with standard IEC connector.•Patented Colour Cool TM thermal management system to optimise and prolong the life of fixtures and LEDs.•The i Drive TM lite technology is licenced and patented in the UK and USA with Worldwide applications pending.•Patented colour mixing 3 channel system.•Simple 3 rotary switch interface sets DMX address and controls all additional pre-set functions.•Smooth dimming control 0 - 100%.•High efficiency (>88%).•Long life and high reliability (50,000 hours).•LED lamp connection with 8 pin RJ45 connector.•Short and open circuit protection.•Standalone mode (no DMX controller required) incorporating many static and dynamic colour functions and programmes.•Self test functions.•No binning of LEDs results in cost savings.•Internal Thermal Protection.•CE ApprovedU S E R M A N U A LThe i Drive lite is one of afamily of devices specificallydesigned for the control anddimming of LED Fixtures.Mains IndicatorWiring Fault IndicatorDMX Indicator Welcome to the iDrive lite , with a host of built in features and protection for your LED fixtures.The iDrive lite is designed to control fixtures containing between 18 and 36 RGB LED's.Please ensure that the LED fixture is plugged into the iDrive RJ45 connector before the mains is switched on, this is important since the system will perform a diagnostic scan of the LED fixture when powered up.The diagnostic scan will test for two functions.1.Open or short circuits in the LED fixture and wiring. If this is detected the faulty channel will be isolated. The RED LED 'wiring fault indicator' will illuminate to confirm this. The iDrive should be turned off at the mains and the fault rectified before powering up the system again.2. The second scan will look for a thermistor on the LED fixture, as recommended in the 'wiring specification' (page 4). If a thermistor is found the 'thermal feedback protection’will be activated in the iDrive.Both these scans take less than 1 second to perform and only take place on initial power up of the system.The iDrive can be used in DMX mode or standalone mode.For DMX SettingsThe rotary switches should be set to between 001and 510. Normally address 0.0.1 is sufficient for a 3channel and master DMX controller.For Stand Alone SettingsThe iDrive contains many pre-set programmes.600 - 636- This setting provides 36 different preset colours - 636 being a white setting, i.e. all LEDS full on.700 - 799- These are the cross fade settings with different speed functions.800 - 819 - Cycle Wash Pre-set.There are two preset cyclic washes, eitherclockwise or anti-clockwise with speed controlMains Indicator - Indicates power onto the iDriveDMX Indicator - When the rotary switches are set to a DMX address i.e. between 001 and 510,this indicator will flash until the iDrive receives a DMX input via the DMX 5-pin XLR input.Once a DMX signal is received, the amber indicator stops flashing and stays permanently on.Wiring Fault Indicator - The iDrive hasshort/open circuit protection. In the event of the LED fixture being incorrectly wired, the indicator will be permanently on until the fault in the LED fixture has been corrected.The iDrive uses DMX 512A - the latest ESTA DMX standard, using isolated 5-pin XLR connections forboth input and output.The iDrive can be networked from one single DMX inputx100x10x10 - 90 - 90 - 9Cross fade settings between colours700 - 790Speed Settings 0 = Fastest9 = Slowestx100x10x10 - 90 - 90 - 9Cycle Wash pre-sets either 800 - 810Speed Settings 0 = Fastest9 = SlowestDMX AND PRE-SET PROGRAMME SETTINGSSwitch Settings Function001 - 510DMX-512A start address 600 - 636Fixed Colour pre-set 700 - 799Cross Fade pre-set 800 - 819Cyclic Wash pre-set0 - 90 - 90 - 9TM DMX IN OUTTM DMX IN OUTTMDMX IN OUTDMX InputTERMINATORWiring configurations for 5-pin XLR G (ground cable shield) to XLR pin No. 1- (negative) to XLR pin No. 2+ (positive) to XLR pin No. 3DMX TerminationIn accordance with good practice of DMX cabling networks. (ESTA & USITT). It is recommended that the last DMX output plug is terminated correctly by fitting a 120 Ohm resistor across terminals 2 & 3 as shown.61-234+12 0 RTerminate with a metal-film resistor of 120 [Ohm]Solder side: male18 x RGB systems12 x RGB systemsTypical wiring configurations for 350mA LED RGB systemWIRING SPECIFICATION INFORMATIONRJ45 WIRING INPUT 1 = Red +2 = Red -3 = Green +4 = Green -5 = Blue +6 = Blue -7 = Thermistor Ground*8 = LED Temperature** IST Ltd recommend that a 10K ohm SMT thermistor type: EPCOS B57621C103J62 is located in the centre ofthe LED board foreffective thermal management control.SPECIFICATIONSELECTRICAL CHARACTERISTICSInputInput Voltage Range : 100 - 240V AC Input Frequency : 50 - 60 Hz Power Consumption : 6 - 55 W Power Power Factor : 0.95Efficiency : 88%Connection: standard IEC Insulation Class: OneOutputPower Output Range : 0 - 16.8 W Per ChannelMaximum Output Current : 350mA @ 100% Maximum Output Voltage : 14V - 48V DC Connection: RJ45 (8 pin)Control Input Dimming Control : DMX-512AConnection: standard XLR 5 pin Dimming Range: 0 - 100 %DMX Start Address Range : 1 - 510 via 3 rotary BCD switches.Mechanical Mounting : Four 3mm holes for wall fixing.Construction : Aluminum casing for improved thermal performance.Weight:600 gramsEnvironmentalOperating Ambient Temperature : -20ºC to + 50°C Storage Ambient Temperature : -20ºC to + 70ºC Case Temperature : + 65ºC Relative Humidity: 80%Lifetime (failures after 50,000 hours): 5%DimensionsThermal Protection:To protect the components used in the production of the iDrive, a thermal over-load protection system has been built into the circuit.Should the ambient temperature, inside the iDrive casing exceed 65º centigrade, the thermal protection system will be activated and the iDrive will be switched off.Once the internal temperature falls to a normal operating level the iDrive will automatically switch itself back on.Warranty and Returns Policy:Product warranty or service will not be honored if:1.The product has been repaired, modified or altered2.The serial number is defaced or missing3.Operation of the product has occurred outside of the published environmental specification.Should the iDrive fail in service within 12 months from the purchase date, please return the unit to your supplier for replacement.There are no serviceable parts in the iDrive,opening of the unit will void all warranties.。

PID图例符号介绍

PID图例符号介绍

LINE SERVICE IDENTIFICATIONSYMBOL SERVICE符号帮助AIR SYSTEMS空气系统IA INSTRUMENT AIR仪表风PA PLANT AIR工厂风DA 烧焦空气STEAM AND CONDENSATE SYSTEMS蒸汽和凝液系统HC HIGH PRESSURE CONDENSATE高压蒸汽凝液MC MEDIUM PRESSURE CONDENSATE中压蒸汽凝液LC LOW PRESSURE CONDENSATE低压蒸汽凝液SC SURFACE CONDENSATE表面凝液DS DILUTION STEAM稀释蒸汽HS HIGH PRESSURE SREAM高压蒸汽MS MEDIUM PRESSURE STEAM中压蒸汽LS SUPERHEA TED LOW PRESSURE STEAM 过热低压蒸汽PS SATURATED LOW PRESSURE STEAM饱和低压蒸汽SHS SUPER HIGH PRESSURE STEAM超高压蒸汽DRAIN SYSTEMS排放系统CD CHEMICAL DRAIN化污LD LIQUID DRAIN液体排放ND NON-CONTAMINATED POLLUTION DRAIN无污染排放OD OIL Y DRAIN油污EXHAUST AND VENT SYSTEMSAV ATMOSPHERIC VENT (NOT FROM PSV) 通大气(不从安全阀)SV SAFETY V ALVE TO A TMOSPHERE安全伐排大气FLARE SYSTEMS火炬系统DF DRY FLARE干火炬WF WET FLARE湿火炬GAS SYSTEMS气体系统FG FUEL GAS燃料气HG HYDROGEN氢气NG NITROGEN氮气SPECIAL LIQUID SYSTEMS特殊液体系统CL CAUSTIC腐蚀性QO QUENCH OIL急冷油SO SEAL OIL密封油WO W ASHING OIL冲洗油(压缩机)PROCESS SERVICE (NORMAL)P PROCESS工艺REFRIGERANT SYSTEMSBR BINARY REFRIGERANT二元制冷PR PROPYLENE REFRIGERANT丙烯冷剂WATER SYSTEMS水系统BFW BOILER FEED WATER锅炉给水FW FIRE WATER消防水IW INTERMEDIATE WATER二次水CWR COOLING WA TER RETURN冷却水回水CWS COOLING WATER SUPPL Y冷却水PW POLISHED WA TER工艺水QW QUENCH WA TER急冷水UW UTILITY WATER工业水WW WASTE W ATER废水MISCELLANEOUS ABBREVIATION AND SERVICE SYMBOLS各种缩写和符号A AIR MOTOR空气马达ACC ACCESSIBLE可接近的ATM ATMOSPHERE大气BL BATTERY LIMIT界区BTS BUBBLE TIGHT SHUT-OFF缓慢紧密切断BV BY VENDOR由供应商提供CONN CONNECTION连接CSC CAR SEAL CLOSED关闭锁定CSO CAR SEAL OPEN打开锁定DEC DETAIL ENGINEERING CONTRACTOR工程承包商详细资料EOR END OF RUN运行结束SOREW EYEW ASH洗眼FLG FLANGE法兰LC LOCKED CLOSED锁定关闭LO LOCKED OPEN锁定打开NC NORMALL Y CLOSED正常情况下关闭NNF NORMALL Y NO FLOW正常情况下无流量NO NORMALL Y OPEN正常情况下打开S SAMPLE CONNECTION取样点SC SAMPLE CONNECTION WITH COOLER 连接冷却器的取样点SOR START OF RUN开始运行SR STRAINER过滤器SS SAFETY SHOWER安全喷淋T LINE DRIP TRAP疏水器TSO TIGHT SHUT OFF密闭切断UC UTILITY CONNECTION公用工程接口LINESMAIN LINE主线SECONDARY LINE副线UNDERGROUND OR BURY地下或隐藏ELECTRICALL Y TRACED电缆线SPECIAL TRACED特殊管线STEAM TRACED蒸汽伴热JACKETED夹套PACKAGED EQUIP BOUNDARY成套设备分界线BA TTERY LIMIT BOUNDARY界区分界线FUTURE未来MATERIAL SPEC BREAK材料规格分界点DESIGN BREAK设计分界点BELOW GROUND LINE RISING ABOVE GRADE 地管伸出点BREAK OF REPONSIBILITY责任分界点MISCELLANEOUS ITEMS各种细节ROD OUT CONNECTIONCLEAN OUT CONNECTION (FLUSHING)清理接口(冲洗)REMOV ABLE SPOOL可拆除短管NOZZLE OR PIPE WITH BLIND FLANGE带盲法兰的喷嘴或管线SPACER FOR BLIND盲管位置NORMALL Y CLOSED正常情况下关闭NORMALL Y OPEN正常情况下打开FIGURE BB 图REVERSIBLE BLIND8字盲板ORIFICE SWAGE孔板INSULATED FLANGED JOINT保温法兰连接PIPE CAP (WELDED)管帽(焊接)PIPE CAP (SCREWED)管帽(法兰)REDUCER变径管T-STRAINERT型过滤器PERMANENT Y-STRAINER (WITH V ALVE) 带阀门Y型过滤器TEMPORARY STRAINER临时过滤器HOSE CONNECTION软管接口SAMPLE CONNECTION取样口**-SERVICE SYMBOL符号说明SEQUENCE NUMBER序列号OPEN DRAIN HUB敞口集液器MATERIAL BALANCE STREAM NUMBER 物流号CONTINUTY ARROW延续箭头INITIAL FEED初始进料GRADE等级TRENCH地沟LINE IDENTIFICATION管线说明INSULATION CODE保温代码MATERIAL SPECIFICATION材质BRANCH IDENTIFIER分支标识SEQUENCE NUMBER管线号PROCESS SECTION AREA(MAY BE SINGLE DIGIT) 工艺区LINE SERVICE SYMBOL管线符号说明LINE SIZE管线尺寸V ALVESGA TE V ALVE闸阀BUTTERFL Y VALVE蝶阀DIAPHRAGM V ALVE隔膜阀GLOBE V ALVE球阀NEEDLE V ALVE针型阀PLUG V ALVE截止阀BALL VALVE球阀CHECK VALVE止逆阀STOP CHECK V ALVE(BOILER NON-RETURN V ALVE) 带手轮止逆阀THREE 0R FOUR V ALVE三通或四通阀MULTI PORT PLUG多向切断阀ANGLE V ALVE角阀DUAL TANDEM BLOWNDOWN V ALVES两段排污阀RAN TYPE V ALVER型阀T-TYPE GLOBE V ALVET型球阀AUTOMA TIC RECIRCULATION V ALVE自动再循环阀INTERLOCKED V ALVES(MECHANICAL LINK))机械联动阀QUICK OPENING OR CLOSING V ALVE快速开关阀V ALVE WITH BODY CA VITY RELIEF OR BODY BLEED CONNECTION 带有排放阀的阀门DAMPER挡板APPROPRIATE ABBREVIATION合适的缩写SLIDE GATE V ALVE滑动闸阀EQUIPMENT IDENTIFACATION设备符号SUPPLIED WITH VENDOR EQUIPMENT供应商提供的设备SPARE(A,B,C,ETC USED IF PARALLEL UNITS)同一设备的编号SEQUENCE NUMBER序列号AREA NUMBER区号EQUIPMENT CODE OF ACCOUNT设备代码UNIT DESIGNATION单元名称E –ETHYLENE乙烯H - DPG HYDROGENA TION汽油加氢U - UTILITY & OFF SITE公用工程PIPING SPECIALTY ITEMS AND MISCELLANEOUS EQUIPMENT特殊管项和各种设备ALL PIPING SPECIALTY ITEMS ARE IDENTIFIED所有特殊管线有以下注明SEQUENCE NUMBER ( NUMBERED IN SAME WAY AS INSTRUMENT ) 序列号(与仪表排序相同)EXHAUST HEAD负呀总管ATOMPHERIC VENT WITH WEATHER CAP防雨放空管DUPLEX STRAINER相同的过滤器PERMANENT BASKET STRAINER提篮式过滤器FLEXIBLE HOSE金属软管EXPANSION JOINT膨胀节INLINE MIXERS OR VENTURI TYPE DESUPER HEATER内嵌式混合器或文丘里型混合器SILENCER消音器EJECTOR OR EDUCTOR喷射器FILTER过滤器FILTER WITH HOOD带罩过滤器CONDENSATE TRAP (NON-PROCESS)凝液疏水器FIRE PROTECTION消防FIRE HYDRANT消防炮FIRE HYDRANT WITH MONITOR带监视器的消防栓FIRE HYDRANT WITH PUPPER CONNECTION 消防栓HOSE HOUSE消防箱V ALVE WITH INDICATOR POST带指示的阀MONITOR监视器EM IF ELEVA TEDPUMP泵CENTRIFUGAL离心泵METERING OR RECIPROCATING计量泵或往复式泵ROTARY {GEAR ,SCREW }齿轮泵VERTICAL SUMP PUMP立式污水泵VERTICAL CANNEDPUMP (PFD ONL Y ALL TYPES)泵LIQUID RING V ACUUM PUMP水环式真空泵COMPRESSOR压缩机SINGLE STAGE RECIPROCATINGMULTI-STAGE RECIPROCA TINGCENTRIFUGAL离心式ROTARY旋转式BLOWER FAN鼓风机BLOWER (PFD ONL Y ALL TYPES)鼓风机COMPRESSOR (PFD ONL Y)压缩机SCREW螺杆式DRIVER驱动装置ELECTRIC MOTOR电动马达DIESEL ENGINE .ETC柴油发动机APPROPRIATE ABBREVIATION相应的缩写A AIR空气D DIESEL柴油H HYDRAULIC水力的M ELECTRIC电气的STEAM TURBINE蒸汽涡轮EXPANDER扩大室HEAT EXCHANGER换热器SHELL AND TUBE HEAT EXCHANGER管壳式换热器HORIZONTAL SHELL AND TUBE HEAT EXCHANGER 水平式管壳式换热器VERTICAL SHELL AND TUBE HEAT EXCHANGER垂直式管壳式换热器SINGEL SECTION DOUBLE PIPE EXCHANGERTWO SECTION DOUBLE PIPE EXCHANGERAIR COOLER空冷器AIR COOLER (PFD ONL Y)空冷器KETTLE TYPE REBOILER OR STEAM GENERATOR KETTLE TYPE EXCHANGER (PFD ONL Y)GRAPHITE BLOCK TYPE EXCHANGERPLATE EXCHANGERDRAWING IDENTIFICATION图形说明REVISION NO.修订号DRAWING NO.图号AREA NO.区号JOB NO.工号DRAWING SIZEVESSELS AND FURNACES容器和炉子FLOATING ROOF TANK浮顶罐CONE ROOF TANK WITH INTERNAL COIL带内盘管锥型顶罐COLUMN柱型PACKINGINTERNAL BAFFLEVORTEX BREAKER旋风分离器CABIN TYPE HEATER WITH EXTERNAL CROSS-OVERSHORIZONAL TYPE HEATER WITH INTERNAL CROSSOVERS 内部有交叉的水平加热管VESSEL ELEVATIONS离地面高度INSULATION CODE保温代码D ANTI-SWEAT INSULATION防水保温E ELECTRICAL TRACINGF FULL HEAT CONSERV ATIONH NORMAL HEAT CONSERV A TION一般保温M DUAL SERVICE INSULATIONP PERSONNEL PROTECTION防护人员S SPECIAL特殊的T STEAM TRACINGV ACOUSTICAL听力的BREAK OF RESPONSIBILITYSYMBOL FOR LOCATION OF TIE-IN POINT CONNECTEDU NEW ETHYLENE STORAGE AREA乙烯新区的V OSBL (ON NORTH SIDE RACK)W OSBL (ON MAIN RACK IN FRONT OF NEW HEATER)X OSBL (ON SOUTH SIDE RACK)Y OSBL (COOLING WATER)E EXISTING AREAD DPG AREAC4 C4 HYDRO AREAD(W) DPG AREA AND THROUGH THE TIE-IN POINT(W) ON THE RACKC4(U) C4 HYDRO AREA AND THROUGH THE TIE-IN POINT(U) ON THE RACKE(W) EXISTING AREA AND THROUGH TIE-IN POINT(W) ON THE RACKE(X) EXISTING AREA AND THROUGH TIE-IN POINT(X) ON THE RACKGENERAL NOTES1. FOR INSTRUMENTA TION SYMBOLS SEE DWG NO.0005B仪表符号参阅图DWG NO.0005B2. FLOW DIAGRAMS ARE DIAGRAMA TIC ONL Y 。

高精度半导体激光器驱动电源系统的设计

高精度半导体激光器驱动电源系统的设计

高精度半导体激光器驱动电源系统的设计刘平英,丁友林(金肯职业技术学院 江苏南京 211156)摘 要:介绍一种以DSP T M S320F2812控制模块为核心的高精度半导体激光器驱动电源系统的设计。

该系统以大功率达林顿管为调整管加电流负反馈电路实现恒流输出,利用DSP 内部集成的模/数转换器对输出电流采样,并经过PI 算法处理后控制PW M 输出实现动态的误差调整,消除电路中的静止误差。

为了提高系统的稳定性,在系统中加入过流、过压保护和延时软启动保护等功能。

结果表明,输出电流范围在10~2500mA 内,输出电流变化的绝对值小于输出电流值的0.1%+1mA,从而确保了半导体激光器工作的可靠性。

关键词:DSP ;半导体激光器;PI 算法;PW M中图分类号:T N248.1 文献标识码:B 文章编号:1004-373X(2009)08-166-04Design of High Precision Semiconductor Lasers Driver Source SystemL IU Ping ying ,DI NG Yo ulin(Ji nken Co ll eg e o f T echno log y,Nanjing,211156,China)Abstract :A highly pr ecise cur rent source dr iver system o f semiconductor laser s is pr esented,w hich ado pts the DSP T M S320F 2812as co ntr ol co re unit.T he system uses a combinatio n of high -pow er Darlingto n tr ansisto r as an adjust or and neg ativ e feedback cir cuit o f cur rent to r ealize constant cur rent output.T he DSP inter ior integr ated A DC is used to sample the cur rent date that co ntr ol the output of P WM after PI algo rit hm pro cessed,w hich is to r ealize dy namic err or regulation and eliminate static er ro r in the circuit.T he pro tect functio n at ov er-curr ent o r ov er-vo ltag e protection circuit and delay star tup unit is added into the sy stem t o impro ve its st abilit y.T he r esult s o f ex periments show that the curr ent output o f the system is betw een 10~2500mA ,and the absolute v alue of the chang ing curr ent output is smaller than 0.1%+1m A,and ensure that lasers diode runs r eliably.Keywords :DSP;semico nduct or lasers diode;P I alg or ithm;P WM收稿日期:2008-07-22基金项目:江苏省高校高级人才科研基金资助资助(04JDG021)0 引 言半导体激光器(LD)是一种固体光源,由于其具有单色性好,体积小,重量轻,价格低廉,功耗小等一系列优点,已被广泛应用。

LD、OUT、AND基本指令1、2

LD、OUT、AND基本指令1、2

学生情况分析:本班现有学生41人,大多数是初中毕业生,接受能力较弱,能主动学习的大约12人,不能主动学习但能认真听课的大约有23人,还有6人学习态度较差,需要逐步提高其学习积极性。

教学法分析:学生对PLC实际经验是一个新的课题,,课程内容又比较抽象所以在讲授过程中主要采取理论联系实际的教学方法,提高学生的学习兴趣,对于PLC的运行环境要全面了解并学会使用并掌握,为了提高其主动学习的能力,采取实验法和提问记分法。

组织教学:(3min)清点人数,集中学生注意力复习旧课:(10min)电动机正反转引入新课:(4min)上面编写的控制程序,都是用梯形图表示的,也可以用基本指令来表示,PLC的基本指令是最常用的指令,FX1S系列PLC的基本指令共有27条。

二、PLC基本指令PLC的指令有基本指令和功能指令之分。

基本指令一般由助记符和操作元件组成,助记符是每一条基本指令的符号。

它表明了操作功能;操作元件是基本指令的操作对象。

某些基本指令仅由助记符组成。

如程序完了以后,以END结束;功能指令是一系列完成不同功能子程序的指令,功能指令主要由功能指令助记符和操作元件两大部分组成。

1.连接和驱动指令这一类指令主要是用于表示触点之间逻辑关系和驱动线圈的驱动指令。

(1)LD指令和LDI指令在梯形图中,每个逻辑行都是从左母线开始的,并通过各类常开触点或常闭触点与左母线连接,这时,对应的指令应该用LD指令或LDI 指令。

1)LD指令称为“取指令”。

其功能是使常开触点与左母线连接。

2)LDI指令称为“取反指令”。

其功能是使常闭触点与左母线连接。

“LD”和“LDI”分别为取指令和取反指令的助记符,LD指令和LDI指令的操作元件可以是输入继电器X、输出继电器Y、辅助继电器M、状态继电器S、定时器T和计数器C中的任何一个。

.LD指令和LDI指令的应用如图2—10所示3)LD指令和LDI指令的说明由触点混联组成的电路块梯形图中,虽然某触点不是接左母线,但它属于电路块第一个触点,即分支起点,如图2-11所示梯形图中,X1、X3的常开触点和X4的常闭触点,这时也要用LD 指令或LDI指令(2)OUT指令OUT指令称为“输出指令”或“驱动指令”;“OUT'’是“驱动指令”的助记符,驱动指令的操作元件可以是输出继电器Y、辅助继电器M、状态继电器S、定时器T和计数器C中的任何一个。

大功率LD的线性驱动电路

大功率LD的线性驱动电路

大功率LD的线性驱动电路摘要: 介绍了一种大功率LD的线性驱动电路,该恒流源电路采用功率MOSFET作电流控制元件,运用负反馈原理稳定输出电流,正向电流0-10A连续可调,纹波峰值10mV,输出电流的短期稳定度达到1 ×10 - 5,具有限流保护,防浪涌冲击,缓启动的功能。

实际应用在一掺Yb光纤激光器的泵浦中,结果表明该驱动电路工作安全可靠。

Abstract:This paper introduces a power driving circuit for LD. It adopts power mosfet as adjust device and current negative feedback to ensure costant current driving with a adjustable forward current 0-10A range and ripple of less than 10mV. This circuit also owns functions of maximum current limitation and slow start.it get application as pump source for a Yb doped optic fiber laser and experimental result prove its operation is reliable and safe.关键词: LD; 驱动电路; 功率MOSFET1.引言:半导体LD激光器具有高单色性、高相干性、高方向性和准直性的特点,还具有尺寸小、重量轻、低电压驱动、直接调制等优良特性,广泛地应用于国防、科研、医疗、光通信等领域[1]。

LD是一种高功率密度并具有极高量子效率的器件,微小的电流将导致光功率输出变化和器件参数(如激射波长,噪声性能,模式跳动)的变化,驱动电路的目的是为LD提供一个干净的稳恒电流,线性恒流源方式电路结构简单,元器件少,无高频开关噪音干扰,缺点在于mosfet工作于线性区,热损耗较大,实际使用时须选择合适的mosfet以减小热损耗。

LASER之每步程序说明

LASER之每步程序说明

程序指令说明一"RUN=START"指出程序开始的点,并清空操作界面的各种数据"RUN=RESTART"重复执行指定的程序,当程序执行此句时,"RUN=CYCLE_STOP"程序运行中,在需要的地方停止运行"RUN=PRODUCT_ID"将产品序列号自动的保存"RUN=PROFILE_SAVE"键入保存细搜寻结果的文件名"RUN=MOTOR_JOG"显示马达运转情况"RUN=POWERMETER_INIT"初始化光功率(光功率初始设定值)"RUN=POWERMETER_AUTO_CH1(CH2)"从手动到自动转换光功率计通道1(2)的范围"RUN=POWERMETER_MANUAL_CH1(CH2)"从自动到手动转换光功率计通道1(2)的范围"RUN=POWERMETER_AUTO_MANUAL_CH1(CH2)"从自动到手动转换光功率计通道1(2)的范围自动完"RUN=LDDRIVER_INIT"初始化电源(电源初始设定值)二"ADD VAR1=VAR2"内部寄存器参数赋予左边三"GET VAR1=VAR2"外部参数赋予左边四"IF VAR0>VAR1;LABEL_A;LABEL_B"判断内部参数是否满足判断式,真跳到A,假跳到B "IF VAR0>VAR1&&VAR2>VAR3;LABEL_A;LABEL_B"判断内部参数既满足第一判断式又满足第二判"IF VAR0>VAR1‖VAR2>VAR3;LABEL_A;LABEL_B"判断内部参数满足第一判断式或满足第二判断五"LABEL=AA"指定LABEL的句子六"GO TO=AA"跳到指定的LABEL七"MOVE2MOTOR=Z1_AXIS;10"移动Z1马达+10距离"MOVE2MOTOR=(MOTORNAME);VAR1"移动指定的马达设定的距离八MOVE2FILE=@ALIGN_UNLOAD.POSMOVE2FILE=@ALIGN_START.POSCOPY2SYSTEM_POSITION_DATA=Destination File.Pos;Source File.Pos复制程序运行当中各马SAVE2CURRENT_POSITION_DATA=ALING_START.POS保留程序运行当中各马达位置参数于命名的参九"ACTUATOR=UPPER_CHUCK_OPEN"打开上夹手气压"ACTUATOR=UPPER_CHUCK_CLOSE"关闭上夹手气压"ACTUATOR=TOCAN_LOCK1""ACTUATOR=TOCAN_FREE1""ACTUATOR=TOCAN_LOCK2""ACTUATOR=TOCAN_FREE2""ACTUATOR=LASER_SHIFT""ACTUATOR=LASER_SHIFT_FREE"十"WAIT=0.2"在程序运行中的一个时间等待十一"LD_DRIVER=ON(OFF)"LD驱动电流的开(关)"LD_DRIVER=ON_CHECK"LD驱动电流的是否供应的检测"LD_DRIVER=ERROR_END""LD_DRIVER=25(NUMBER)"输出设定值的电流"LD_DRIVER=VAR0"输出变数(任意值)的电流"LD_DRIVER=KEY_IN"输出手动键入的电流"LD_DRIVER=TEC_ON(OFF)"十二"POWER_METER=UPPER(LOWER)"手动增加或减少光功率机的取值范围"POWER_METER=-10(VAR1)"手动设额定光功率机的取值范围为-10"POWER_METER=FLAG_ON(OFF)十三"SET_POWERMETER_MODEL=MODELNAME从列表上选择并指定光功率十四"POWERMETER_WL_CHECK=1310(1550)检查光功率设定的波长,假如设定的波长和光功率的波长不十五"AMPERE_METER=VOLTAGE_ON""AMPERE_METER=VOLTAGE_OFF""AMPERE_METER=DARK_CURRENT_CHECK""AMPERE_METER=DARK_CURRENT_ERROR_END"十六"MESSAGE_BOX=Message-1;Message-2;Message-3;Message-4;Message-5"不换行显示信息,最"MESSAGE_BOX_DEMO=Message-1;Message-2;Message-3;Message-4;Message-5"单独显示信息,"MESSAGE_BOX_JUMP=Message-1;Message-1…;LABEL_A"显示信息,点击OK继续执行程序,点"WARNING_BOX=Message-1;Message-1…;LABEL_A"此程序运行时,绿灯闪烁,发出警报声"WARNING_BOX_JUMP=Message-1;Message-1…;LABEL_A"此程序运行时,绿灯闪烁,发出警报声5十七"DBM2UW=VAR?;VAR?"改变左边的数值从DBM到UW,并显示到右边"UW2DBM=VAR?;VAR?"改变左边的数值从UW到DBM,并显示到右边十八"TOUCH2BASE=filename(TOUCH2BASE DATA).ini"进入表面接触搜寻参数档,执行相应的参数要十九"ADJUSTMENT2ANGLE=filename(ADJUSTMENT2ANGLE DATA).ini"进入角度调整参数档,执行相应二十"SEARCH2FIFLD=filename1.ini;filename2.ini;filename3.ini"进入粗搜寻参数档,执行相应"SEARCH2PEAK=filename1.ini"进入细搜寻参数档,执行相应的参数要求"SEARCH2XYZ=filename1.ini;filename2.ini;Peak.ini;XYZ.ini"进入XYZ参数档,执行相应的二十一"SET_JUMPUP_DISTANCE_XYZ=VAR1(KEY_IN or 100)在XYZ搜寻时Z轴固定距离的移动二十二"SEARCH2DEFOCUS=Peak.ini;XYZ.ini""SEARCH2DEFOCUS=Peak.ini;XYZ.ini;VAR1""SEARCH2ITH=20;15;VAR0"求ITH"SEARCH2THETA=Field_1.ini;Field_2.ini;Peak.ini;THETA_90_10.ini""SEARCH2ONEPEAK=onePeakFile.ini""DATABASE=F1_DATA;X1_AXIS""DATABASE=F1_DATA;OPTICAL POWER_1CH""ILLUMINATOR=2.5"设定照明灯的供电电压"WELDING=SCHEDULE_SET;01"指定YAG雷射所用的参数档"WELDING=FLASH;0"显示是否雷射的信息 0显示对话窗 1不显示对话窗"WELDING=ROTATION;Angle Value"旋转角度后的雷射"WELDING=CAMERA_VIEW;MEASAGE1/MEASAGE2/MEASAGE3/MEASAGE4""WELDING=SHUTTER_ON_OFF;0"手动控制YAG机光闸的开关 0关 1开"SHUTTER_ON=ALL(1,2,3)"打开指定的YAG机光闸"SHUTTER_OFF=ALL(1,2,3)"关闭指定的YAG机光闸"MACRO=FILE NAME""HAMMERING_SCREEN_VIEW=DEFAULT""HAMMERING_SCREEN_LD CURRENT=VAR1(or25)的范围自动完成,不知道范围时使用此句到A,假跳到B一判断式又满足第二判断式跳到A,假跳到B判断式或满足第二判断式跳到A,全不满足时跳到B 复制程序运行当中各马达位置参数于命名的参数档达位置参数于命名的参数档波长和光功率的波长不一样将发出警报显示信息,最多20条age-5"单独显示信息,但每个大约3秒显示下一条OK继续执行程序,点击CANCEL跳至LABEL语句警报声5秒,点击OK执行下一步,点击CANCEL停止运行绿灯闪烁,发出警报声5秒,点击OK继续执行程序,点击CANCEL跳至LABEL语句档,执行相应的参数要求调整参数档,执行相应的参数要求搜寻参数档,执行相应的参数要求YZ参数档,执行相应的参数要求距离的移动。

LED驱动电源设计

LED驱动电源设计

L E D驱动电源设计(总57页)--本页仅作为文档封面,使用时请直接删除即可----内页可以根据需求调整合适字体及大小--重庆大学本科学生毕业设计(论文)LED驱动电源设计学生:周灏学号:指导教师:唐治德专业:电气工程与自动化重庆大学电气工程学院二O一一年六月Graduation Design(Thesis) of Chongqing University Design of Driver Power for LEDUndergraduate: Zhou HaoSupervisor: Prof. Tang ZhideMajor: Electric Engineering & AutomationSchool of Electric EngineeringChongqing UniversityJune 2011摘要该文针对LED驱动电源的设计需要,先简述了LED及其驱动电源的基本情况,包括BUCK电路及其控制电路的工作原理、稳定性分析等。

然后以UC3843电流控制芯片和BUCK电路为基础,设计出了一款车用LED驱动电源,并通过仿真实验,对电路进行了检验。

文中详细介绍了UC4843的使用方法、该驱动电源的设计步骤以及具体参数计算。

这款驱动电路工作在12V直流电压下,以BUCK电路为主电路,采用峰值电流控制模式,按照PWM调制方法,对两颗串联的LED进行供电,实现了恒流输出、欠压保护、过载保护、空载保护、斜坡补偿等功能,并且在仿真实验中均体现出了各部分的作用。

这款LED驱动电源工作稳定,抗干扰能力强,输入范围广,输出电流平稳;通过简单改变供电方式,此电路还能用于不同领域。

另外该文还对仿真实验结果进行了较为详细的分析,对补偿斜坡尾部上翘、电流采样电阻的至畸作用进行了讨论。

关键词:驱动电源,峰值电流控制,PWM, LED,UC3843ABSTRACTThis article for the purpose of the design needs of LED driver power, firstly summarizing briefly the basic information of LED and its driver power, including BUCK circuit as well as its working principles of control circuit, the stability analysis etc. Then based on the UC3843 electric current control-chip and BUCK circuit, a vehicle LED driver power has been designed, and its electric circuit has been tested through the simulation experiments. This article describes the usages of the UC4843, the design process of the driver circuit and the specific parameter calculation in detail.This driver power works at 12V DC voltage, with BUCK circuit as the main circuit, adopting the control mode of peak current, in accordance with the PWM modulation method, providing power to two series connections of LED, bringing about the functions of under-voltage protection, overload protection, idle-load protection, slope compensation, and reflecting their respective functions in the simulation experiments. This LED driver power works stably, with strong anti-interference ability, wide input range; stable output current; by changing the way of power supply, the circuit can also be used in different fields.In addition, this article also carried on a more detailed analysis of the simulation experiment results, and carried out the discussion of abnormal functions about the upturned slope compensation and disruption of the current sampling.Key words:Driver power,Peak current mode control,PWM,LED,UC3843目录中文摘要 (Ⅰ)ABSTRACT (Ⅱ)1绪论 (1)电光源 (1)大功率LED简介 (2)大功率LED发光原理 (2)大功率LED的特性 (3)LED驱动电源研究现状 (6)LED驱动电源的分类 (6)LED及其驱动电源的市场 (7)2 降压性开关电源 (9)开关电源的特性 (9)BUCK电路原理分析 (10)BUCK电路基本原理 (10)BUCK连续导通模式 (11)3 控制电路 (17)开关电源的调制方式 (17)开关电源的控制模式 (19)峰值电流控制模式的稳定性分析 (22)不稳定性的产生 (22)斜坡补偿技术 (24)4 UC3843高性能电流模式控制器 (26)UC3843的主要特性 (26)UC3843的工作原理 (27)UC3843的引脚及其功能 (28)UC3843的内部结构 (29)UC3843的各模块具体特性 (32)5 基于UC3843的LED驱动电源设计 (35)电路结构 (35)主电路 (35)控制电路 (36)器件选择 (37)参数计算 (38)最终电路 (42)6 仿真实验 (43)正常状态运行 (43)斜坡补偿的效果检验 (45)电源波动对电路的影响 (46)电流取样点的选择对电路的影响 (48)7 结论 (50)致谢 (51)参考文献 (52)1 绪论电光源灯具作为人们日常生活中接触最多电气类产品,是现代化社会不可或缺的一部分。

ld链接脚本文件解析之五

ld链接脚本文件解析之五

ld链接脚本文件解析之五展开全文输入节中的普通符号.-----------------------------------对于普通符号,需要一个特殊的标识, 因为在很多目标格式中, 普通符号没有一个特定的输入节. 连接器会把普通符号处理成好像它们在一个叫做'COMMON'的节中.你可能像使用带有其他输入节的文件名一样使用带有'COMMON'节的文件名。

你可以通过这个把来自一个特定输入文件的普通符号放入一个节中,同时把来自其它输入文件的普通符号放入另一个节中。

在大多数情况下,输入文件中的普通符号会被放到输出文件的'.bss'节中。

比如:.bss { *(.bss) *(COMMON) }有些目标文件格式具有多于一个的普通符号。

比如,MIPS ELF目标文件格式区分标准普通符号和小普通符号。

在这种情况下,连接器会为其他类型的普通符号使用一个不同的特殊节名。

在MIPS ELF的情况中,连接器为标准普通符号使用'COMMON',并且为小普通符号使用'.common'。

这就允许你把不同类型的普通符号映射到内存的不同位置。

在一些老的连接脚本上,你有时会看到'[COMMON]'。

这个符号现在已经过时了,它等效于'*(COMMON)'。

输入节和垃圾收集---------------------------------------当连接时垃圾收集正在使用中时('--gc-sections'),这在标识那些不应该被排除在外的节时非常有用。

这是通过在输入节的通配符入口外面加上'KEEP()'实现的,比如'KEEP(*(.init))'或者'KEEP(SORT(*)(.sorts))'。

输入节示例---------------------接下来的例子是一个完整的连接脚本。

ld驱动电路设计

ld驱动电路设计

ld驱动电路设计
在LD(激光二极管)驱动电路设计中,通常需要满足以下要求:
1.提供稳定的电流:LD需要稳定的电流才能正常工作,因此驱动电路应具备恒流源的特性,能够提供稳定的电流。

2.快速响应:LD通常需要快速启停,因此驱动电路应具有快速响应能力,以满足LD的启停要求。

3.电压控制:为了调整LD的功率和调制其输出光束,驱动电路应具有电压控制功能。

通过调整驱动电压,可以改变通过LD的电流,从而控制其输出光束的功率和调制。

4.温度控制:LD的工作性能受温度影响较大,因此驱动电路应具有温度控制功能。

通过监测LD的温度,驱动电路可以调节其输出电流或电压,以保持LD的工作温度稳定。

5.保护功能:为了防止LD过热或过流而损坏,驱动电路应具备保护功能。

当检测到LD的工作状态异常时,驱动电路应能够自动减小电流或关闭电路,以保护LD免受损坏。

总之,一个合格的LD驱动电路设计应该考虑以上几个方面,以满足LD的工作要求和确保其可靠、稳定的工作状态。

如需更多信息,建议咨询电子工程专家或查阅电子工程相关书籍。

无源波分解决方案介绍

无源波分解决方案介绍

无源波分设备产品介绍01 02 03无源波分产品原理无源波分使用场景无源波分安装及维护指导3波分复用器波分复用器彩光模块4l WDM (wavelength Division Multiplexing )是将一系列载有信息、但波长不同的光信号合成一束,沿着单根光纤传输;在接收端再用同样的技术,将各个不同波长的光信号分开的通信技术。

这种技术可以同时在一根光纤上传输多路信号,每一路信号都由某种特定波长的光来传送,一个波长称之为一个信道。

l 不同光纤类型不同波长有不同的衰减目前国内大量使用的是G.652D 光纤,因为此光纤比其他类型的G.652光纤类型在1383+/-3nm 水峰处的衰减系数最低,同时PMD 也更小。

G.652D 光纤正常的衰减系数:0.35dB/km (1310nm ),0.25dB/km (1550nm)l1l2l3l4l5l6l1l2l3l4l5l6MUX DEMUX5l CWDM (Coarse Wavelength Division Multiplexing):信道间隔20nm ,工作波长范围为1271nm~1611nm 。

因此CWDM 对激光器、复用/解复用器的要求大大降低,极大地减少了扩容成本。

主要用于中短距离的光城域网中,并且无法通过光再次放大增加传输距离,因为CWDM 整个光谱太宽340nm ,光放增益无法达到;l DWDM (Dense Wavelength Division Multiplexing ):最小信道间隔0.2nm ,C+band 最多可以传输192波(10G )。

利用单模光纤的带宽以及低损耗的特性,采用多个波长作为载波,允许各载波信道在光纤内同时传输。

适合大容量、传输距离比较远的网络,同时可以实现EDFA 光纤光放器对信号放大,实现超长跨距;DWDM6filter中心波长带宽•λcenter = λc -6.5 ~ λc +6.5±6.5nm CWDM Gridwavelength λcenterUnit: nm 1分8波分复用器1分16波分复用器方案说明:•每个波长都是按照上图所示带宽为+/-6.5nm 的带通滤波器,激光器的光谱大于这个滤波窗口就会对传输的信号损伤;•波分复用器的端口数是通过滤波器的级联而实现,每个端口都是一个特定的波长,端口数越多也就是级联级数越多,级联越多插损越大;主要波分复用规格7Ø由于RRU 是室外工作设备,R 与其对接的波分复用器需要具备以下几个特性:•工作温度:-40度~85度•防水防尘:IP67•安装方式:19英寸、抱杆或者挂壁•集成度:支持3个插片(1U )、支持16个槽位(3U )•支持混传:支持多种速率业务的混传•业务能力:支持CPRI 等业务的透明传输1U 托盘MD16无源机框1U 盒子OM12/OD123U盒子挂壁或者抱杆防水盒8p 光模块主要由光电子器件、功能电路和光接口等组成,包括发射和接收两部分。

LD驱动器

LD驱动器

比较两款LD半导体激光器驱动器
这里对比的是Thorlabs的0~4安培激光二极管驱动器,型号是LDC240C和XTECH的LD-7.5A。

如下图所示,左边为Thorlabs的产品,右边为XTECH的产品。

一.输出电流比较
LDC240C的最大输出电流只有4A,这个是Thorlabs公司的最大电流的激光二极管驱动;LD-7.5A的输出电流为7.5A,可以很容易驱动IPG的25W光纤激光器。

二.自适应电压比较
LDC240C的最大适应电压用户手册上写的是大于5V;LD-7.5A的最大自适应电压为5.5V;两款电源相差不大。

三.输入电压比较
LDC240C的供电必须为100 V, 115 V, 230 V交流电任选其一;LD-7.5A的供电电压为12V~33V(用户选择)的直流电压。

四.尺寸比较
LDC240C的(W * H * D)是146 x 77 x 320 mm³;LD-7.5A的(W * H * D)是5cm*8cm*10cm(超小体积)。

五.工作温度比较
LDC240C的工作温度是0 to 40 °C;LD-7.5A的工作温度是-50°to 55 °C。

六.操作接口比较
LDC240C的操作界面简单易用,人机接口完善;LD-7.5A的使用接插件电位器调节方式,需要外接电位器实现调节。

七.价格比的比较
LDC240C的价格官方给定的是1万左右人民币;LD-7.5A的价位是不到他的五分之一。

综上对比试验发现LDC240C具有天生的进口产品血统,具有超高的使用用户体验;LD-7.5A为国产质量优秀产品,价格较低,适合集成到用户使用的系统中。

EMI问题分析

EMI问题分析
13.4ns 上升时间差别: LD2:上升时间:2.2ns,下降时间:3.4ns LD2 Driver上升时间:4.4ns,下降时间:4ns 2# LD2和Ld driver输出时延差:12.6ns LD2 rise time:3.2ns, decline time:2.8ns LD2 driver out: rise:5.8ns, decline:5.4ns
-39dbv
PMIC part
开LD_SUPPLY正面LD驱动电路辐射大
造成开LD_SUPPLY后主板辐射大的原因:LD_supply 回路开关MOS导致的。
辐射及LD driver输出对应关系
上升时间比较 1#板(cut)
LD_SUPPLY 尖峰发生在MOS关断时 LD_SUPPLY VS. LD Driver
开关激光对LD/LD Driver out 的功率无影响
LD_SUPPLY ON
LD_SUPPLY OFF
关LD_SUPPLY的板子辐射情况
LD_SUPPLY关闭时测到的耦合信号的幅值小于 500mV
打开LD_SUPPLY正面LD驱动电路辐射大
LD_SUPPLY打开后测到的耦合信号强度峰峰值大于5V.
2#
Peak is caused by MOS turn off
LD dirver output vs. LD_SUPPLY LD_SUPPLY 尖峰发生在MOS关断时
• 结论: LD_SUPPLY正向尖峰发生在负载断开; 是主要的辐射源。
解决思路: 1)消除尖峰 通过在MOS的漏极增加对地尖峰吸收 电路; 目前由于LD_SUPPLY寄生电容约为7nF,关MOS的震 荡无法在本版本消除,但过冲的幅值可以控制在 2v以内;260M频谱可以减6dBV; 重点在后续版本调试一下。

OB3380_NM

OB3380_NM

©On-Bright Electronics Confidential Preliminary DatasheetOB_DOC_DS_OB338002- 1 -General InformationPin ConfigurationThe pin map is shown as below for SOP8.Ordering Information Part Number Description OB3380CP SOP8, Pb-free OB3380CPA SOP8, Pb-free in TapingPackage Dissipation Rating Package R θJA (℃/W) SOP8 150Absolute Maximum Ratings Parameter Value VIN to GND -0.3V to 500V VDD to GND -0.3V to 40V CS, LD, T OFF to GND-0.3V to 7V GATE, TRIAC to GND-0.3V to (VDD+0.3V)Junction Temperature(T J ) range-40℃ to 150 ℃Storage Temperature(T stg ) range-55 to 150 ℃Lead Temperature(Soldering, 10secs) 260℃Note: Stresses beyond those listed under “absolutemaximum ratings” may cause permanent damage to the device.These are stress ratings only, functional operation of the device at these or any other conditions beyond those indicated under “recommended operating conditions” is not implied. Exposure to absolute maximum-rated conditions for extended periods may affect device reliability.Marking InformationBlock DiagramPin DescriptionsPin Num Pin Name I/O Description1 CSICurrent sense pin used to sense the MOSFET current by means of anexternal sense resistor. When this pin exceeds the lower of either theinternal 500mV or the voltage at the LD pin, the Gate output goes low2 VDD P Power supply for internal circuit3 GNDPGround4 LDILinear dimming input and sets the current sense threshold as long asthe voltage at the pin is less than 500mV5 VINP20V~500Vinput6 TRIAC O Gate driver for the damper when at TRIAC dimming7 T OFF I/O Connecting an external resistor this pin to determine Gate off time.8 GATE O Gate driver output for power MOSFETElectrical Characteristics(T A = 25℃, VIN=20V, if not otherwise noted)Symbol Parameter Test Conditions Min Typ Max Unit InputV INDC Input DC supplyvoltage rangeDC input voltage 20 500 VI INSD Shut down modesupply current0.6 0.8 mAInternal RegulatorVDD Internally regulatedvoltageVIN=20V, C GATE=1nF 111213VVDD, line Line regulation of VDD VIN= 20V~ 500V 0.5 VUVLO_OFF VDD under voltagelockout releasethresholdVDD rising 9.5 VUVLO_ON VDD under voltagelockout thresholdVDD falling 9.2 VI IN,MAX Current that theregulator can supplyVIN=20V 3mACurrent Sense ComparatorV TH-CS Current sense pull-inthreshold voltage475500525mVT BLANKING Current sense blankinginterval200260320nST D-OC Delay to output 60 nS OscillatorF OP OperatingFrequency 200 KHzT OFF Gate off time R TOFF 50K to GND 14 15 16 uS Gate DriverV OL I source=20mA 0.8 V V OH I sink=20mA V DD-1.2 V T R Gate output rise time C GATE=1nF 70 100 nST F Gate output fall time C GATE=1nF 50 80 nST R-triac TRIAC output rise time C TRIAC=1nF 500 nST F-triac TRIAC output fall time C TRIAC=1nF 500 nS ProtectionTSD Temperature shut down Temperature rising 150 ℃T SD-hys Temperature shut downrelease hysteresisTSD release hysteresis 35 ℃V OCP CS over voltagethreshold1.5 VLD pinV LD LD floating voltage 3 VI LD_pull LD internal pull upcurrent0.5uAOperation DescriptionThe OB3380 is designed as a buck LED driver using open-loop peak current control mode. This method of control enables fairly accurate LED current control without the need for high side current sensing or the design of any closed loop controllers. The OB3380 maintains stability over all operating conditions without the need for loop compensation components. Therefore the OB3380 minimizes external component count to economize bill of materials cost.The OB3380 operates in constant off-time control scheme. The off-time can be adjusted by the values selected for the external resistor at the T OFF pin. The oscillator generates pulses that set the GATE driver to turn on. The same pulses also start the blanking timer to prevent false turn-off due to the turn-on spikes. When the FET turns on, the current through the inductor starts ramping up. This current flows through the external sense resistor R CS and produces a ramp voltage at CS pin. Internal comparators compare the CS pin voltage to both the voltage at the LD pin and the internal voltage 500mV. After the blanking timer is complete, the outputs of these comparators are sent to control the GATE. When the output of either one of the two comparators goes high, the GATE output goes low. Assuming a 30% ripple in the inductor current, the current sense resistor R CS can be calculated by:()(A)I •2/%301)V(orV 0.5=R LED LD CS +Input Voltage RegulatorThrough VIN pin, the OB3380 provides 12V output voltage which is used to power internal circuits and external components. When charging the gate capacitance of the MOSFET, current surge is generated, which results in big ripple voltage and this could affect normal operation. Therefore, connecting a low ESR capacitor at the VIN pin to stabilize operation is necessary.Current SenseThe current sense input of the OB3380 goes to the non-inverting inputs of two comparators. The inverting terminal of one comparator is tied to an internal 500mV reference whereas the inverting terminal of the other comparator is connected to the LD pin. The outputs of both these comparatorsare fed into an OR GATE and the output of OR GATE is fed into the reset pin of the flip-flop. Thus, the comparator which has the lowest voltage at the inverting terminal determines when the GATE output is turned off.The outputs of the comparators also include a blanking time which prevents spurious turn-offs of the external FET due to the turn-on spikes normally present in peak current mode control. An external RC filter is suggested to be added between the R CS and CS pin.Linear DimmingThe LD pin is used to control the LED current. In some cases, it may not be possible to find the exact R CS value required to obtain the LED current when the internal 500mV is used. In these cases, an external voltage divider from the VDD pin can be connected to the LD pin to obtain a voltage(less than 500mV) corresponding to the desired voltage across R CS.Linear dimming may be desired to adjust the current level to reduce the intensity of the LEDs. In these cases, an external 0~500mV voltage can be connected to the LD pin to adjust the LED current during operation.To use the internal 500mV, the LD pin can be floating.Toff time controlThe resistor connected to ground of Toff pin sets the Gate Toff time. It can be calculated by : )(3.0=)(KOhm R uS T toff off ×A Toff short detection circuit is integrated in the OB3380. So, the Rtoff value should be selected larger than 12.5K in system application, unless there will be no gate pulse output.TRIAC DimmingThe LED driver is not a pure resistive load. It produces some voltage shocks at the beginning of every AC cycle when working together with traditional TRIAC dimmer. The voltage shocks result in visible luminance flick, so that a resistor is needed in series in the loop to damp the shocks. The damper causes efficiency loose and thermal issue evidently. To attenuate this side effect, the OB3380 integrates a TRIAC pin to short the damper resistor at every duty cycle after certain time delay.Reference Application 1: A simple application without dimming functionReference Application 2: An application with TRIAC dimming and OVPPackage Mechanical DataDimensions In Millimeters Dimensions In Inches SymbolMin Max Min MaxA 1.350 1.750 0.053 0.069A1 0.050 0.250 0.002 0.010 A2 1.250 1.650 0.049 0.065b 0.310 0.510 0.012 0.020c 0.170 0.250 0.006 0.010D 4.700 5.150 0.185 0.203E 3.800 4.000 0.150 0.157E1 5.800 6.200 0.228 0.244e 1.270 (BSC) 0.05 (BSC)L 0.400 1.270 0.016 0.050 θ 0º 8º 0º 8ºIMPORTANT NOTICERIGHT TO MAKE CHANGESOn-Bright Electronics Corp. reserves the right to make corrections, modifications, enhancements, improvements and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete.WARRANTY INFORMATIONOn-Bright Electronics Corp. warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with its standard warranty. Testing and other quality control techniques are used to the extent it deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed.On-Bright Electronics Corp. assumes no liability for application assistance or customer product design. Customers are responsible for their products and applications using On-Bright’s components, data sheet and application notes. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards.LIFE SUPPORTOn-Bright Electronics Corp.’s products are not designed to be used as components in devices intended to support or sustain human life. On-bright Electronics Corp. will not be held liable for any damages or claims resulting from the use of its products in medical applications.MILITARYOn-Bright Electronics Corp.’s products are not designed for use in military applications. On-Bright Electronics Corp. will not be held liable for any damages or claims resulting from the use of its products in military applications.。

相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

注:这一部分没仿真出结果,有些元件库中没有,只在原理上做了些说明。
4/5
NX85温度控制电路 该电路由制冷器(Cooler) 、热敏电阻元件( Thermistor)及控制电路组成,如 NX8562 所示。热敏电阻作为传感器探测激光器节区的温度,并传递给控制电路。制冷器多采用 半导体制冷器,他是利用半导体材料的珀尔帖效应(当直流电流通过两种半导体组成的 电偶时,出现一端吸热一端放热的现象) 。 自动温度控制电路,如下图所示,电桥的作用是把温度的变化转换为电量的变化,运算 放大器的差动输入端跨接在电桥的对端,来改变三极管的基极电流。设定温度为 25 摄 氏度,此时热敏电阻元件电阻值为 10K。因此选择电桥电阻 R14、R15 为 10K,可变电阻 R16、R17(代替热敏电阻 Thermistor)为 20K。调节 R16 阻值可以设置不同的温度值。 调节过程: LD 温度合适,电桥平衡时,放大器输出信号为 0,三极管截止,Cooler 不作用。 LD 温度升高,Thermistor 阻值减小,电桥失衡,放大器输出电压升高,三极管基极电流 增大,Cooler 作用制冷,从而保持温度恒定。
3/5
NX8562 系列激光二极管驱动电路设计
4、 自动功率控制电路(APC)设计 这一部分是控制激光器恒定输出的关键, 主要是利用 PD 功率检测负反馈地调节 LD 功率 输出,使其输出光功率不随温度升高和使用时间增长而改变。 手册中有两种激光器 NX8562LF/LB,这里采用 NX8562LF 共阳极。根据手册,输出恒定 10mW 光功率时, LD 正向电流IF = 80mA, 正向电压VF = 1.1V; PD 监测电流IM = 0.8mA。 APC 电路采用简单设计,设在设定温度范围内 20~35 摄氏度、10mW 输出时, LD 正向电流IF 可变范围为 20~120 mA,正向电压VF 可变范围相应为 0.9~1.3V。 R7 是为了降低增益使电路稳定工作, 同时在还可以在晶体管集、 射极短路时限制电 流保护 LD。 一般三极管放大倍数在几十到几百之间, 取典型值 100, 则IB =
根据数据手册的数据可知,要求Pf = ������������������������恒定输出。 则 LD 正向电流������������ = ������������������������,正向电压������������ = ������. ������������。PD 监测电流������������ = ������. ������������������
IM
max
β




1mA,R7 取值一般为几十欧姆,取 20Ω,此时VCE = V������������ − V������ − R4 ∗ IM ≅ 2.3������,工 作在放大区。 R5 是为了防止基极电流过大,这里取 1.1K。 PD 检测电流可变范围取 0.1~1.5 mA。运放 U12A 参考电压 Vref 设为 2.5v(可调)。则 R9 可取值 2.5V/1.5mA=1.67K。取标称值 1.65K 电阻。这样当正常工作时 PD 监测电 流IM = 0.8mA,2.5V/0.8mA=3.125K,因此可以串联 10K 可变电阻 R8 来调节输出电 压信号为 2.5V。 U12A 是的参考电压由 R11、R12 组成的分压电路组成,可以根据需要调整参考电压 电压,以或得要求光功率输出。U9A 是由 LM358AH 运放组成的射随器,提高带负 载的能力。 电路图如下所示, 负反馈控制环路则由光检测器件 PIN、 运算放大器 U9A 和 U12A、 半导体三极管等组成。可以根据需要调节参考电压,以适应 LD 不同功率的输出。 工作过程: LD 输出光功率↓→PIN 输出电流↓→射随器 U9A 输出电压↓→V25↓→U12A 输出电 压↑→三极管基极电流↑→三极管集电极电流↑→LD 输出功率↑
5/5
6、 参考了挺多文献和别人设计的,仿真时总是出现一些问题没有仿真出结果,没法检验正 确性。电路设计有些不熟悉,其中不免有错,请老师指正。谢谢! 7、 参考文献: [1] [2] [3] [4] [5] [6] 徐秀芳,胡晓东. 半导体激光器的功率稳恒控制技术. 光子学报, 2001. 胥绍禹. 半导体激光器驱动电路的制作. 成都, 华西医科大学附二院, 2000. 赵军卫. 采用三个放大器芯片组成的光功率自动控制电路. 西北核技术研究所. 林咏梅,毛海涛. 一种半导体激光器驱动电源的设计. 激光杂志, 2006. 田国栋. 光发射机 APC 及 ATC 电路研究与分析. 电子设计工程, 2011. 涂用军. 一种高稳定半导体激光器驱动电源的设计与分析. 光学与光电技术, 2009.
光纤通信作业 赵书龙 201311782
NX8562 系列激光二极管驱动电路设计
要求:10mW 恒定功率输出。要考虑温度变化、激光二极管自身老化对功率的影响,做到自 动恒温控制、自动功率控制。 1、 NX8562 系列激光二极管基本参数 LD 参数 温度 正向电压 (20mW) 正向电流 (20mW) 开启电流 参数 检测电流 (20mW) 参数 正向电流 LD 反向电压 LD 正向电流 PD 反向电压 PD 符号 TSET VF IF ITH 符号 Im 单位 ℃ V mA mA PD 单位 mA 额定极限值 符号 IF VR IF VR 单位 mA V mA V 额定值 300 2.0 10 20 最小值 0.1 典型值 最大值 2 20 最小值 20 1.2 120 典型值 最大值 35 1.5 167
2/5
NX8562 系列激光二极管驱动电路设计
慢启动电路 在开关闭合的瞬间产生了大量的高频成分,产生驱动电流幅度过冲,损害激光器。慢启 动电路,经过两个π型滤波网络滤除了大部分高频分量,直流及低频分量则可顺利地通 过。 由电阻 R1 和 C17 组成时间延迟网络, 时间延迟网络的延迟时间常数 t=RC, 代入 R=7.0k Ω ,C=220uF,得到 t=1.54s。瞬态分析仿真可以明显看到电压随着时间逐渐升高到 5V。 可以有效消除电源开断产生的浪涌。
1/5
NX8562 系列激光二极管驱动电路设计
2、 驱动电路的设计思路 直流稳 压电源 慢启动 自动功率控制
自动温度控制
激光器
3、 直流稳压电源和慢启动设计 直流稳压电源 对 220V 市电进行 AC/DC 转换,得到合适的驱动电压。电压恒定的 AC/DC 稳压电源模块 分四个环节:变压、整流、滤波、稳压。根据需要取驱动电压为 5V。 根据资料稳压模块的输入电压应在 7V—35 之间。但如果电压大于 12V 会使得 LM7805 发 热明显,电压过小会使得无法稳定在 5V 的输出。设计中留有一定余量,选择电压比为 23:1 的变压器,将峰值 311V 的交流电转变为峰值 11-12V 左右交流电。 可以得到仿真结果稳定电压 5.02V。 电路设计和仿真结果如下图。
相关文档
最新文档