- 1、本文档共24页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
VB编写的GPIB控制设备和串口控制产品的测试系统程序(国外英文资料)
VB编写的GPIB控制设备和串口控制产品的测试系统程序
When you use the computer, you should install the NI488.2 GPIB driver and add niglobal.bas and vbib-32.bas to the VB module
Private Declare, Sub, Sleep, Lib, Kernel32 (ByVal, dwMilliseconds, As, Long) delay control call
Run load
Private, Sub, Form_Load ()
Textsend.Text = PD 1 sends the initial command in the send column
Serial port initialization
MSComm1.CommPort = 1 sets the communication port number to COM1
MSComm1.Settings = 9600, N, 8,1 sets the 1 parameter of the serial port
MSComm1.InputMode = 0 receive text data
End Sub
PD1 calibration
Private, Sub, Pd1cal_Click ()
Textcal.Text =
Dim, Dev_ATT, As, Integer,ATT addresses
Dim, Dev_OPM, As, Integer,OPM addresses
Const ARRAYSIZE = 1024 reads the cache bytes
Dim, PowerVal, As, String * ARRAYSIZE light power read power
Dim Tpower As String total power of light source
Const Initial_ATT = 13ATT initial decrement
Dim, ATT, As, String,ATT attenuation
Const Sleep_ATT = 3000ATT attenuation delay after OPM read value
Const Sleep_Comm = 100 serial communication delay
Const Sleep_Cal = 6000PD calibration delay
Const Offset_Pd = 0.5PD compensation value
Dev_ATT% = ildev (0, 28, 0, T3s, 1, 0)
Dev_OPM% = ildev (0, 20, 0, T3s, 1, 0)
Ilclr Dev_ATT%
Ilclr Dev_OPM%
Ilwrt Dev_ATT%, INP:ATT Initial_ATT, Len (INP:ATT Initial_ATT) sends attenuation values to ATT
Ilwrt Dev_ATT%, OUTP 0, Len (: OUTP 0) close ATT
MsgBox (please connect the light source power probe 1)
Ilwrt Dev_ATT%, OUTP 1, Len (: OUTP 1) open ATT
Sleep Sleep_ATT delay
Ilwrt Dev_OPM%, read1:chan1:power?, Len (: read1:chan1:power) sends read optical power instructions.
Ilrd, Dev_OPM%, PowerVal$, Len (PowerVal$) read the optical power return value
Tpower$= PowerVal$+ Initial_ATT calculates the total power of the light source
Ilwrt Dev_ATT%, OUTP 0, Len (: OUTP 0) close ATT
MsgBox (please connect the light source to 1A)
ilwrt dev _ att% : outp 1, len (: outp 1 ) is 打开att
msgboxyou (确认连接插损最小)
shell d: \ \ \ \ gpib.exe shiyan study vb
mscomm1.po
您可能关注的文档
- 74系列CD4000系列集成电路速查(国外英文资料).doc
- 74系列ic(国外英文资料).doc
- 74系列 数字集成电路 型号功能表(国外英文资料).doc
- 74系列数字IC(国外英文资料).doc
- 74系列清单(国外英文资料).doc
- 74系列芯片功能CD系列门电路功能(国外英文资料).doc
- 74系列芯片名称及解释(国外英文资料).doc
- 74系列芯片功能对照(国外英文资料).doc
- 74系列芯片引脚图资料大全(国外英文资料).doc
- 74系列和CD系列的芯片(国外英文资料).doc
- 重庆新速达物业服务集团股份凯里公司招聘笔试题库2024.pdf
- 浙江杭州千岛湖泰众肉类食品有限公司招聘笔试题库2024.pdf
- 陕西新华出版传媒集团新华书店分公司招聘笔试题库2024.pdf
- 宁夏海原县肉牛产业发展集团有限公司招聘笔试题库2024.pdf
- 浙江温岭市化工轻工建筑材料有限公司招聘笔试题库2024.pdf
- 中航飞机汉中航空零组件制造有限公司招聘笔试题库2024.pdf
- 山东海阳市海昇矿产资源开发有限公司招聘笔试题库2024.pdf
- 山东潍坊寿光市公共交通运输有限公司招聘笔试题库2024.pdf
- 内蒙古察右前旗农业投资开发有限公司招聘笔试题库2024.pdf
- 线上清明祭英烈活动策划.pptx
文档评论(0)