ImageVerifierCode 换一换
格式:DOCX , 页数:19 ,大小:23.57KB ,
资源ID:11622877      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/11622877.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(iFIX常见问题问答.docx)为本站会员(b****5)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

iFIX常见问题问答.docx

1、iFIX常见问题问答iFIX常见问题问答1:iFIX中如何使用vba开启和停止wsqlodc和alarmsODBC?DescriptionThe ability to stop or start the SQL task, wsqlodc, and to pause or continue the alarms to ODBC task used to only be available by launching Mission Control and manually controlling them. The ability to perform this control programm

2、atically using VBA was added as part of a SIM for iFix 2.5. The function calls to allow this are not widely documented and are shown below: -ResolutionDeclare Function TurnOnSqlTask Lib missionvba (ByVal cmd$) As LongTurns on a SQL task.The cmd$ parameter is the command line passed to the SQL taskRe

3、turn of 0 is a success.Current logged in user must have security rights to turnon/off SAC.If a non-zero error code is returned, you can use the err2strutility in the fix base directory to translate the error to a stringDeclare Function TurnOffSqlTask Lib missionvba () As LongTurns off a SQL task.Ret

4、urn of 0 is a success.Current logged in user musthave security rights to turn on/off SAC.If a non-zero error code is returned,you can use the err2str utility in the fix base directory to translate the error to a stringDeclare Function PauseAlarmODBC Lib missionvba () As LongPauses the AlarmODBC task

5、.Return of 0 is a success.Current logged in user does NOThave to have security rights.This function will execute regardless of the Allow Operator to Pause Alarm LoggingSetting found in the iFIX ODBC Alarm Service Configurator of the System ConfigurationUtility.Private Declare Function ContinueAlarmO

6、DBC Lib missionvba () As LongResumes the AlarmODBC task.Return of 0 is a success.Current logged in user does NOThave to have security rights.This function will execute regardless of the Allow Operator to Pause Alarm LoggingSetting found in the iFIX ODBC Alarm Service Configurator of the System Confi

7、gurationUtility.All of these functions will block until the request is completed.2:iFIX如何使用vba开启和停止基于时间和事件的调度?Description:This solution shows how to start and stop a time-based or event-based schedule running in the background.Resolution:STOP / START a EVENT BASED SCHEDULETo Start:Private Sub Comman

8、dButton1_Click()Dim Var1 As ObjectDim Var2 As ObjectSet Var1 = GetObject(, FixBackGroundServer.Application)Set Var2 = Var1.System.FindObject(SchedTest1.FIXEvent1)Var2.StartEventEnd SubTo Stop:Private Sub CommandButton1_Click()Dim Var1 As ObjectDim Var2 As ObjectSet Var1 = GetObject(, FixBackGroundSe

9、rver.Application)Set Var2 = Var1.System.FindObject(SchedTest1.FIXEvent1)Var2.StopEventEnd SubSTOP / START a TIME BASED SCHEDULETo Stop the TimerObject:Private Sub CommandButton1_Click()Dim Var1 As ObjectDim Var2 As ObjectSet Var1 = GetObject (,FixBackGroundServer.Application)Set Var2 = Var1.System.F

10、indObject(Sched1.Timer1)Var2.TimerEnabled = FalseEnd SubTo Start the TimerObject:Private Sub CommandButton2_Click()Dim Var1 As ObjectDim Var2 As ObjectSet Var1 = GetObject (,FixBackGroundServer.Application)Set Var2 = Var1.System.FindObject(sched.Timer1)Var2.TimerEnabled = TrueVar2.StartTimerEnd Sub

11、3:iFIX如何使用vba进行网络打印机打印?Description:The following is an example of printing an Excel Document to a Network Printer or a printer other than the default printer on the machine.Dim objXL As ObjectDim myDoc As ObjectSet objXL = CreateObject(Excel.Application)Set myDoc = objXL.Workbooks.Open(C:testfile.xl

12、s, , True) myDoc.Printout copies:=1, preview:=False, ActivePrinter:=SERVERPRINTER, printtofile:=False, collate:=True myDoc.CloseSet objXL = NothingSet myDoc = Nothing ReferencesIf this script is used in a background schedule with FixBackgroundServer configured to run as a Service, the Fix service mu

13、st run under a user account that has printers defined. See KnowledgeBase Article i013417 for moreinformation on this configuration.The Printout command can be used for other document types (Word, PowerPoint, etc), however different syntaxis required, refer to for other examples.4:iFIX报警状态代码以及意义?Desc

14、ription:FIX displays alarm status codes for each alarm in the Alarm Summary Link. What is the meaning of each of these codes?ResolutionPriority - Alarm Type - Description1 - COMM - Communication Error (BAD value)1 - OCD - Open circuit detected1 - OVER - Over Range1 - UNDER - Under Range1 - ERROR - A

15、ny Statistical Data block alarm2 - CFN - Change from normal alarm (digital blocks only)2 - COS - Change of State alarm (digital blocks only)2 - HIHI - Block in HIHI alarm state2 - LOLO - Block in LOLO alarm state3 - RATE - Value exceeds rate-of-change setting3 - HI - Block in HI alarm state3 - LO -

16、Block in LO alarm state4 - DEV - Deviation Alarm5 - OK - Block in normal state5:如何禁止和使能7X驱动标签点(对驱动自动禁止特别有用)?Dim opcDriver As New OPCDrv.OPCServerDim objDriver As ObjectDim strDRVAcronym As StringDim strProgId As StringVariables for GetChannelDim lngNumChannels As LongDim lngChanHandlesDim strChanNam

17、esVariables for GetDevicesDim lngNumDevices As LongDim lngDeviceHandlesDim strDeviceNamesVariables for GetDataBlocksDim lngNumDataBlocks As LongDim lngDataBlockHandlesDim strDataBlockNamesDim i As IntegerDim j As IntegerDim lngErrorsDim myvar As LongDim readEnablestrDRVAcronym = InputBox(Please ente

18、r the drivers three letter acronym? & vbCrLf & (For Example: Enter ABR for the ABR Driver), What Driver are you using?)strProgId = Intellution. & strDRVAcronym & drvstrProgId = Matrikon.OPC.Simulation.1Set objDriver = CreateObject(strProgId)lngNumChannels = opcDriver.GetChannels(lngChanHandles, strC

19、hanNames)Build Variables for SetPropertyData function.lngHandle = lngDataBlockHandles(0)varProperties = EnabledvarProperyData = 1opcDriver.GetPropertyData lngChanHandles(1), varProperties, readEnable对服器1置真If readEnable = 0 ThenlngErrors = opcDriver.SetPropertyData(lngChanHandles(1), varProperties, v

20、arProperyData)End IflngNumDevices = opcDriver.GetDevices(lngChanHandles(1), lngDeviceHandles, strDeviceNames)lngNumDataBlocks = opcDriver.GetDataBlocks(lngDeviceHandles(0), lngDataBlockHandles, strDataBlockNames)lngHandle = lngDataBlockHandles(0)读工作组opcDriver.GetPropertyData lngDeviceHandles(0), var

21、Properties, readEnableIf readEnable = 0 ThenlngErrors = opcDriver.SetPropertyData(lngDeviceHandles(0), varProperties, varProperyData)End If处理工作块opcDriver.GetPropertyData lngDataBlockHandles(0), varProperties, readEnableIf readEnable = 0 ThenFor i = 0 To 1lngErrors = opcDriver.SetPropertyData(lngData

22、BlockHandles(i), varProperties, varProperyData)Next iEnd IfSet opcDriver = Nothing6:iFIX_如何使用脚本实现驱动(7x)的启动和停止?DescriptionThe following solution explains how to Start and Stop a 7.x driver through VBA code. This example uses the ABR driver. To implement this with another 7.x driver, change the ABR to

23、 the three letter acronym of the other driver and switch the reference to that driver.ResolutionThis code will only work with 7.x drivers. If you want to implement this is code in a new picture you need to set a reference to Intellution ABRDrv OPC Server 7.20 Library. To set a reference, use the fol

24、lowing steps:1) On the Tools menu in the VB Editor choose References.2) Select the Intellution ABRDrv OPC Server 7.20 Library from the list.Add two command buttons to your picture and name them cmdStart_Click and cmdStop_Click.Then paste the following code into the picture:Private Sub cmdStart_Click

25、()Dim ABRDriver As New ABRDrv.ABRServerABRDriver.StopSet ABRDriver = NothingEnd SubPrivate Sub cmdStop_Click()Dim ABRDriver As New ABRDrv.ABRServerABRDriver.StartSet ABRDriver = NothingEnd Sub 7:iFIX_如何使用脚本实现驱动(6x)的启动和停止?DescriptionThis articles describes how to control (start or stop) the 6.x drive

26、rs through VBA, Command Script, or DOS rather than in Mission Control.ResolutionThe attached application DCTRL61.EXE enables you to do this. Below are the usage instructions.Usage: DCTRL command driver acronym delay sleepwhere command is:START - start the driverSTOP - stop the driver from pollingSTO

27、P_EXIT - stop polling and exitSLEEP - set new sleep time (period)STATUS - displays current valuesDELAY - Wait a Number of milliseconds before executing this command ( 1000 = 1 second).The the dctrl61.exe must be located in the FIX32 or Dynamics directory. The command and driveracronym must be in ALL

28、 CAPS.Example from the DOS prompt: dctrl60 START MBRExample from a iFIX VBA: Shell c:fix32dctrl60 START MBRExample from a FIX32 script: Runtask c:fix32dctrl60 START MBR8:iFIX_脚本进行调度的启动和关闭方法?DescriptionThis solution shows how to start and stop a time-based or event-based schedule running in the backg

29、round.ResolutionSTOP / START a EVENT BASED SCHEDULETo Start:Private Sub CommandButton1_Click()Dim Var1 As ObjectDim Var2 As ObjectSet Var1 = GetObject(, FixBackGroundServer.Application)Set Var2 = Var1.System.FindObject(SchedTest1.FIXEvent1)Var2.StartEventEnd SubTo Stop:Private Sub CommandButton1_Cli

30、ck()Dim Var1 As ObjectDim Var2 As ObjectSet Var1 = GetObject(, FixBackGroundServer.Application)Set Var2 = Var1.System.FindObject(SchedTest1.FIXEvent1)Var2.StopEventEnd SubSTOP / START a TIME BASED SCHEDULETo Stop the TimerObject:Private Sub CommandButton1_Click()Dim Var1 As ObjectDim Var2 As ObjectS

31、et Var1 = GetObject (,FixBackGroundServer.Application)Set Var2 = Var1.System.FindObject(Sched1.Timer1)Var2.TimerEnabled = FalseEnd SubTo Start the TimerObject:Private Sub CommandButton2_Click()Dim Var1 As ObjectDim Var2 As ObjectSet Var1 = GetObject (,FixBackGroundServer.Application)Set Var2 = Var1.System.FindObject(sched.Timer1)Var2.TimerEna

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1