IFIX问题处理

合集下载

ifix经典问题回答-16页word资料

ifix经典问题回答-16页word资料

iFIX经典问题问答1:iFIX中如何使用vba开启和停止wsqlodc和alarmsODBC?DescriptionThe ability to stop or start the SQL task, wsqlodc, and to pause or continue the alarms toODBC task used to only be available by launching Mission Control and manually controlling the m.The ability to perform this control programmatically 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 Long'Turns on a SQL task. The cmd$ parameter is the command line passed to the SQL task'Return of 0 is a success. Current logged in user must have 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 TurnOffSqlTask Lib "missionvba" () As Long'Turns off a SQL task. Return of 0 is a success. Current logged in user must'have 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 Long'Pauses the AlarmODBC task. Return of 0 is a success. Current logged in user does NOT'have to have security rights.'This function will execute regardless of the "Allow Operator to Pause Alarm Logging"'Setting found in the iFIX ODBC Alarm Service Configurator of the System Configuration'Utility.Private Declare Function ContinueAlarmODBC Lib "missionvba" () As Long'Resumes the AlarmODBC task. Return of 0 is a success. Current logged in user does NOT'have to have security rights.'This function will execute regardless of the "Allow Operator to Pause Alarm Logging"'Setting found in the iFIX ODBC Alarm Service Configurator of the System Configuration'Utility.'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 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_Click()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 ObjectSet 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.TimerEnabled = TrueVar2.StartTimerEnd Sub3:iFIX如何使用vba进行网络打印机打印?Description:The following is an example of printing an Excel Document to a Network Printer or a printer other than thedefault printer on the machine.Dim objXL As ObjectDim myDoc As ObjectSet objXL = CreateObject("Excel.Application")Set myDoc = objXL.Workbooks.Open("C:\testfile.xls", , True)myDoc.Printout copies:=1, preview:=False, ActivePrinter:="'\\SERVER\PRINTER", printtofile:= False, collate:=TruemyDoc.CloseSet objXL = NothingSet myDoc = NothingReferencesIf this script is used in a background schedule with FixBackgroundServer configured to run as a S ervice, the Fixservice must run under a user account that has printers defined. See KnowledgeBase Article i0134 17 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报警状态代码以及意义?Description: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 --> Any 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 --> RA TE --> Value exceeds rate-of-change setting3 --> HI --> Block in HI alarm state3 --> LO --> 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 String''Variables for GetChannelDim lngNumChannels As LongDim lngChanHandlesDim strChanNames''Variables for GetDevicesDim lngNumDevices As LongDim lngDeviceHandlesDim strDeviceNames''Variables for GetDataBlocksDim lngNumDataBlocks As LongDim lngDataBlockHandlesDim strDataBlockNamesDim i As IntegerDim j As IntegerDim lngErrorsDim myvar As LongDim readEnable'strDRV Acronym = InputBox("Please enter the driver''s three letter acronym?" & vbCrLf & "(For Example:Enter ABR for the ABR Driver)", "What Driver are you using?")'strProgId = "Intellution." & strDRV Acronym & "drv"'strProgId = "Matrikon.OPC.Simulation.1"'Set objDriver = CreateObject(strProgId)lngNumChannels = opcDriver.GetChannels(lngChanHandles, strChanNames)''Build Variables for SetPropertyData function.lngHandle = lngDataBlockHandles(0)varProperties = "Enabled"varProperyData = "1"opcDriver.GetPropertyData lngChanHandles(1), varProperties, readEnable'对服器1置真If readEnable = "0" ThenlngErrors = opcDriver.SetPropertyData(lngChanHandles(1), varProperties, varProperyData) End IflngNumDevices = opcDriver.GetDevices(lngChanHandles(1), lngDeviceHandles, strDeviceName s)lngNumDataBlocks = opcDriver.GetDataBlocks(lngDeviceHandles(0), lngDataBlockHandles, str DataBlockNames)lngHandle = lngDataBlockHandles(0)'读工作组opcDriver.GetPropertyData lngDeviceHandles(0), varProperties, 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(lngDataBlockHandles(i), varProperties, varProperyD ata)Next iEnd IfSet opcDriver = Nothing6:iFIX_如何使用脚本实现驱动(7x)的启动和停止?DescriptionThe following solution explains how to Start and Stop a 7.x driver through VBA code. This examp le usesthe ABR driver. To implement this with another 7.x driver, change the ABR to the three letter acro nym ofthe 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 y ouneed to set a reference to Intellution ABRDrv OPC Server 7.20 Library. To set a reference, use the following 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()Dim ABRDriver As New ABRDrv.ABRServerABRDriver.StopSet ABRDriver = NothingEnd SubPrivate Sub cmdStop_Click()Dim ABRDriver As New ABRDrv.ABRServerABRDriver.StartSet ABRDriver = NothingEnd Sub7:iFIX_如何使用脚本实现驱动(6x)的启动和停止?DescriptionThis articles describes how to control (start or stop) the 6.x drivers 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 [sleep]where command is:START - start the driverSTOP - stop the driver from pollingSTOP_EXIT - stop polling and exitSLEEP - set new sleep time (period)STA TUS - 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 driver acronym must be in ALL CAPS.Example from the DOS prompt: dctrl60 START MBRExample from a iFIX VBA: Shell c:\fix32\dctrl60 "START MBR"Example from a FIX32 script: Runtask c:\fix32\dctrl60 "START MBR"8:iFIX_脚本进行调度的启动和关闭方法?DescriptionThis solution shows how to start and stop a time-based or event-based schedule running in the bac kground.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_Click()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 ObjectSet 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.TimerEnabled = TrueVar2.StartTimerEnd Sub9:iFIX_excel报表实现的方法?Private Sub CommandButton1_Click()'注释: 1。

ifix通信故障分析及解决方案

ifix通信故障分析及解决方案

iFIX通信故障分析及解决方案袁思远(安徽华电宿州发电有限公司,安徽 宿州 234000)Failure Analysis and Solution of iFIX CommunicationYUAN Siyuan(Anhui Huadian Suzhou Power Generation Co., Ltd., Suzhou 234000)〔摘 要〕 介绍了Proficy HMI /SCADA -iFIX 的基本原理及通信数据流,对某公司iFIX 出现的通信故障问题进行了总结,并分析故障原因,给出了解决方案,在此基础上,提供了快速解决iFIX 通信故障相关问题的方法、建议及思路。

〔关键词〕 组态软件;通信故障;过程控制;I /O 驱动器Abstract :This paper introduces the basic principle and communication data flow of Proficy HMI / SCADA-iFIX, summarizes the communication failure problems of iFIX in a company, analyzes the causes of the failure, and gives the solutions. On this basis, it provides the methods, suggestions and ideas for quickly solving the problems related to the communication failure of iFIX.Key words :configuration software; communication failure; process control; I/O driver 中图分类号:TM73 文献标识码:A 文章编号:1008-6226 (2020) 04-0061-03制软件,运用先进的自动化技术、计算机技术和网络技术于一身,可以实现过程数据的采集、实时过程参数监视、报警、控制和报表查询打印、实时趋势显示、历史数据查看等功能。

IFIX历史趋势图问题

IFIX历史趋势图问题

IFIX 历史趋势图起始时间问题解决方案IFIX演示工程上的趋势图功能强大及使用,一般在做工程时会借鉴里面的画面及控件。

简单的把画面拷贝到新的工程总会出现很多问题,功能不能实现,VBA脚本报错等问题。

先做一个工程借用演示工程的趋势图出现一个起始时间不能设置的问题,添加历史曲线后只能看最新的曲线,看前几天曲线时要一点一点的往前翻,而不能直接选择时间查看当天。

实例所带的是VBA的一个窗口,使用下拉框控件,该空间显示为short的日期,在该处选择日期,在演示工程中使用很好,拷贝到新工程就不可以了,而且报错。

先讨论一下该日期的来源:我们做历史数据时可以设置保存数据格式 4小时,8小时,24小时等。

相应历史数据文件会保存到..\HATDATA\FIX文件夹中。

然后通过FindHistoricalFiles函数进行查找,该函数会自动查找..\HATDATA\FIX文件夹下的文件名称,读取文件名提取日期保存到变量中赋值给日期选择下拉列框。

演示系统函数会默认读取安装模块所带默认工程中的数据。

当新建工程是工程文件可能会改变。

会发现下拉列框中没有实际保存的数据。

而且FindHistoricalFiles函数在演示系统中实在project_user的modhistoricalFiles模块中进行定义的,想正确使用必须从演示系统中导出,在新系统中导入并且修改,较为繁琐。

如该函数正确使用,会发现历史文件越来越多,函数读取的文件名称越多,下拉列框的数据也会越来越多,不方便操作解决方案:1.在CFixPicture_Initialize()过程中将图片对象(Chart Object)起始时间srtChartStartDT=FindHistoricalFiles(“THISNODE”)(0),修改为srtChartStartDT=NOW,2.日期选择控件使用DTPicker代替下拉列框做为趋势图时间选择。

把DTPicker返回值赋予变量参数strselectedDate.其他地方不用修改,因为VBA 中该变量多处使用如不明白框架,修改一次而动全身。

IFIX报警区域数据库不匹配解决方法

IFIX报警区域数据库不匹配解决方法

IFIX报警区域数据库不匹配解决方法
报警截图:
问题解释:
每个动态的过程数据库(PDB) 文件都有一个相关的
报警区数据库(AAD) 文件,如下图:。

当一个PDB文件开始被装载,不管iFIX是在启动或是运行时,PDB
文件将试图定位其相关的AAD文件,为这个PDB文件定位到AlarmAreas.AAD文件并将其装入AADPATH。

如果AlarmAreas.AAD文件不匹配,将出现下面的信息:
如果继续,块的报警区指派可能不合法,这个数据库将无法保存。

如果单击“确定”并继续,在所有块中的所有报警区都将被改为“ALL”。

此外,将不能保存数据库,因为所有的自定义的字段
将丢失。

解决方法:
方法1:定位正确的AAD文件并将其复制到Local文件夹下,覆盖AlarmAreas.AAD文件。

方法2:导出PDB文件为CSV格式文件,在导出的CSV文件中更改报警区,并将新的CSV文件导入一个空数据库中。

IFIX问题处理知识分享

IFIX问题处理知识分享

I F I X问题处理IFIX冗余服务器配置IFIX冗余服务器配置 (3)IFIX冗余服务器数据源的切换 (7)历史报警的查询(这里只做出来在客户机上生成的) (10)历史数据时间保存一年。

(16)冗余服务器历史数据同步。

(16)当服务器切换时,客户机的历史趋势仍然能切换。

(16)计算机启动时IFIX自动运行。

(17)IFIX冗余服务器配置首先配置—网络如图所示添加远程节点名,然后点击配置见如图所示。

然后配置-SCADA组态,如图所示,SCADA邻居为SER02然后配置—本地启动,见如图所示,本地节点名为SER01,本地逻辑节点名为IFIX最后更改C:\WINDOWS\system32\drivers\etc目录下的hosts文件用记事本打开更改如下图所示其中圈里面的东西为增加的地方,包含两个冗余服务器,五个客户机。

至此主服务器的配置就完成了。

备服务器配置更改与主服务器类似。

只是需要注意SCADA邻居为SER01,本地节点名需为SER02。

其他不需要更改。

客户机的配置禁用SCADA支持本地启动需更改为如图所示,本地节点名和本地逻辑节点名均为CL4(以客户机4为例)其他配置和服务器一样,包括网络配置和更高hosts文件。

到这里IFIX冗余服务器的系统配置完成。

IFIX冗余服务器数据源的切换当客户机与主服务器连接丢失时,系统会自动切换到备用的服务器,达到自动切换的效果,果然主服务器这时候恢复正常,不会自动切换回主服务器(可以自动切换不推荐),此时如果需要切换回去,能够在操作站画面上手动的方式切换。

效果图如上图所示,代表此时连接的是SER01的数据源,SER01与SER02都正常。

点击中间的按钮可以实现SER01和SER02的手动切换。

当主服务器故障时,系统会自动切换到SER02,如图所示此时代表SER01与该客户机通信故障,接收的是SER02的数据源。

当主服务器恢复后不会自动切换回(可以自动切换,但是不推荐,因为IFIX如果是服务器与PLC通信故障是不会达到切换的效果的,此时需要手动切换)手动切换方法:新建一个如图所示的画面(参见系统自带画面LocalAsPrimary.GRF、但是在客户机上需更改)更改的部分为原画面中所有的标签后缀_0更改为_1,且脚本的也要进行相应的修改。

IFIX的N个解决方法_SOFTPLC

IFIX的N个解决方法_SOFTPLC
Dim Var1 As Object
Dim Var2 As Object
Set Var1 = GetObject (,"lication")
Set Var2 = Var1.System.FindObject("sched.Timer1")
Set Var2 = Var1.System.FindObject("SchedTest1.FIXEvent1")
Var2.StopEvent
End Sub
STOP / START a TIME BASED SCHEDULE
To Stop the TimerObject:
the SQL task
'Return of 0 is a success. Current logged in user must have security
rights to turn
'on/off SAC. If a non-zero error code is returned, you can use the
'Turns off a SQL task. Return of 0 is a success. Current logged in
user must
'have security rights to turn on/off SAC. If a non-zero error code is
manually controlling them.
The ability to perform this control programmatically using VBA was added

最新ifix经典问题回答

最新ifix经典问题回答

i f i x经典问题回答iFIX经典问题问答1:iFIX中如何使用vba开启和停止wsqlodc和alarmsODBC?DescriptionThe ability to stop or start the SQL task, wsqlodc, and to pause or continue the alarms toODBC task used to only be available by launching Mission Control and manually co ntrolling them.The ability to perform this control programmatically using VBA was added as part of a SIM foriFix 2.5. The function calls to allow this are not widely documented and are shown be low: -ResolutionDeclare Function TurnOnSqlTask Lib "missionvba" (ByVal cmd$) As Long'Turns on a SQL task. The cmd$ parameter is the command line passed to the SQL ta sk'Return of 0 is a success. Current logged in user must have 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 TurnOffSqlTask Lib "missionvba" () As Long'Turns off a SQL task. Return of 0 is a success. Current logged in user must'have 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 string Declare Function PauseAlarmODBC Lib "missionvba" () As Long'Pauses the AlarmODBC task. Return of 0 is a success. Current logged in user does NOT'have to have security rights.'This function will execute regardless of the "Allow Operator to Pause Alarm Logging "'Setting found in the iFIX ODBC Alarm Service Configurator of the System Configur ation'Utility.Private Declare Function ContinueAlarmODBC Lib "missionvba" () As Long'Resumes the AlarmODBC task. Return of 0 is a success. Current logged in user doe s NOT'have to have security rights.'This function will execute regardless of the "Allow Operator to Pause Alarm Logging "'Setting found in the iFIX ODBC Alarm Service Configurator of the System Configur ation'Utility.'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 schedulerunning in the background.Resolution:STOP / 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_Click()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 ObjectSet 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.TimerEnabled = TrueVar2.StartTimerEnd Sub3:iFIX如何使用vba进行网络打印机打印?Description:The following is an example of printing an Excel Document to a Network Printer or a printer other than thedefault printer on the machine.Dim objXL As ObjectDim myDoc As ObjectSet objXL = CreateObject("Excel.Application")Set myDoc = objXL.Workbooks.Open("C:\testfile.xls", , True)myDoc.Printout copies:=1, preview:=False, ActivePrinter:="'\\SERVER\PRINTER", printtofile:=False, collate:=TruemyDoc.CloseSet objXL = NothingSet myDoc = NothingReferencesIf this script is used in a background schedule with FixBackgroundServer configured t o run as a Service, the Fixservice must 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报警状态代码以及意义?Description:FIX displays alarm status codes for each alarm in the Alarm Summary Link. What is t he 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 --> Any 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 --> 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 String''Variables for GetChannelDim lngNumChannels As LongDim lngChanHandlesDim strChanNames''Variables for GetDevicesDim lngNumDevices As LongDim lngDeviceHandlesDim strDeviceNames''Variables for GetDataBlocksDim lngNumDataBlocks As LongDim lngDataBlockHandlesDim strDataBlockNamesDim i As IntegerDim j As IntegerDim lngErrorsDim myvar As LongDim readEnable'strDRVAcronym = InputBox("Please enter the driver''s three letter acronym?" & vbC rLf & "(For Example:Enter ABR for the ABR Driver)", "What Driver are you using?")'strProgId = "Intellution." & strDRVAcronym & "drv"'strProgId = "Matrikon.OPC.Simulation.1"'Set objDriver = CreateObject(strProgId)lngNumChannels = opcDriver.GetChannels(lngChanHandles, strChanNames)''Build Variables for SetPropertyData function.lngHandle = lngDataBlockHandles(0)varProperties = "Enabled"varProperyData = "1"opcDriver.GetPropertyData lngChanHandles(1), varProperties, readEnable'对服器1置真If readEnable = "0" ThenlngErrors = opcDriver.SetPropertyData(lngChanHandles(1), varProperties, varProp eryData)End IflngNumDevices = opcDriver.GetDevices(lngChanHandles(1), lngDeviceHandles, str DeviceNames)lngNumDataBlocks = opcDriver.GetDataBlocks(lngDeviceHandles(0), lngDataBlock Handles, strDataBlockNames)lngHandle = lngDataBlockHandles(0)'读工作组opcDriver.GetPropertyData lngDeviceHandles(0), varProperties, readEnableIf readEnable = "0" ThenlngErrors = opcDriver.SetPropertyData(lngDeviceHandles(0), varProperties, varPr operyData)End If'处理工作块opcDriver.GetPropertyData lngDataBlockHandles(0), varProperties, readEnableIf readEnable = "0" ThenFor i = 0 To 1lngErrors = opcDriver.SetPropertyData(lngDataBlockHandles(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 usesthe ABR driver. To implement this with another 7.x driver, change the ABR to the thr ee letter acronym ofthe 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 n ew picture youneed to set a reference to Intellution ABRDrv OPC Server 7.20 Library. To set a refer ence, use the following 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 cmdSt op_Click.Then paste the following code into the picture:Private Sub cmdStart_Click()Dim ABRDriver As New ABRDrv.ABRServerABRDriver.StopSet ABRDriver = NothingEnd SubPrivate Sub cmdStop_Click()Dim ABRDriver As New ABRDrv.ABRServerABRDriver.StartSet ABRDriver = NothingEnd Sub7:iFIX_如何使用脚本实现驱动(6x)的启动和停止?DescriptionThis articles describes how to control (start or stop) the 6.x drivers through VBA, Co mmand 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 [sleep]where command is:START - start the driverSTOP - stop the driver from pollingSTOP_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 comma nd and driveracronym must be in ALL CAPS.Example from the DOS prompt: dctrl60 START MBRExample from a iFIX VBA: Shell c:\fix32\dctrl60 "START MBR"Example from a FIX32 script: Runtask c:\fix32\dctrl60 "START MBR"8:iFIX_脚本进行调度的启动和关闭方法?DescriptionThis solution shows how to start and stop a time-based or event-based schedule running in the background.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_Click()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 ObjectSet 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.TimerEnabled = TrueVar2.StartTimerEnd Sub9:iFIX_excel报表实现的方法?Private Sub CommandButton1_Click()'注释: 1。

iFIX启动时的几种常见问题及解决方法

iFIX启动时的几种常见问题及解决方法

iFIX启动时的几种常见问题及解决方法第一个现象:启动iFIX,出现下述提示:故障原因:出现上面的提示是因为打开的工程目录与备份时的目录不同。

解决方法:最简单的就是将备份恢复到原来的路径中。

可以通过下面的方法打开SCU看到路径。

如果想恢复到其它的路径中,按下面的方法做:1)打开下面这个界面,运行SCU:2)打开你备份的SCU文件:3)我的这个例子中,原来的程序是放在F盘中,现在将备份恢复到了D盘。

因此,在SCU 中的路径中看到的是F盘。

4)修改项目路径为D:\IFIX\XHUA,注意,不要修改根目录和语言的路径:上图中只修改了项目的路径。

5)点下面的更改项目按钮,提示如下图:选否。

保存SCU。

第二种现象:运行工程后,提示如下:如果点确定后,再运行,会提示,点确定后,再一次点,则提示。

故障原因:出现这个提示,很多人认为是没有启用安全。

其实不是这样的,工程的安全如果备份前是启用的,备份后也是启用的。

真正的原因是当前打开的工程的安全配置路径和备份的工程安全配置路径不相同。

安全配置和SCU是两个完全不同的应用程序,安全配置是保存在A TCOMPAT.UTL和XTCOMPAT.UTL中的,因此通过修改SCU的工程路径是不能修改到这两个文件的。

要手动修改安全配置路径。

通过下图可以看出,直接打开工程的SCU,安全配置是灰色的,不能修改。

如果运行iFIX,又提示安全未启用,进不了安全配置。

解决方法:最简单的当然还是将备份恢复到原来的路径中。

如果恢复到了其它路径中,按下面的方法解决。

1. 随便新建个工程,不要用演示系统和iFIX自带的工程(原因下面再说),进入SCU 配置中打开你的工程的SCU文件,进入安全配置,会看到下图:F:\AAA\LOCAL是我随便建的一个空工程。

2. 修改安全路径和备份路径为你要打开工程的LOCAL路径,启用和禁止不用管,你原来的工程是什么,会自动调整。

我的工程放在D:\IFIX\XHUA下。

IFIX通讯故障解决思路

IFIX通讯故障解决思路

很多朋友在‎用IFIX‎‎的时候都遇‎到过,IFIX通‎讯故障,也就是画面‎上显示“”的情况。

在这里,把握个人解‎决这个问题‎的思路进行‎总结,以供大家参‎考(在此,我只讨论P‎‎L C 以外的‎故障)。

首先,数据由PL‎‎C到IFI‎‎X的过程数‎‎据库结构如‎‎下:1.IFIX读‎取P LC中‎的数据:I\O驱动器从‎过程硬件寄‎存器中读取‎数据,将数据传入‎D IT(驱动器影像‎表)中,SAC从D‎‎I T中读取‎数据,存入PDB‎‎(过程数据库‎)中。

2.IFIX向‎P LC中写‎数据:IFIX 写数据到P‎‎D B,PDB将数‎据写入DI‎‎T,I\O驱动器从‎D IT中读‎取数据写入‎P L C中。

当我们明白‎了这个IF‎‎IX与PL‎‎C通讯的这‎个过程,我们解决I‎‎F IX通讯‎故障也就变‎得容易了。

我个人的思‎路是由下向‎上逐层检查‎。

既:检查物理连‎接,检查驱动程‎序,检查SAC‎‎三个步骤。

一、应用MBE‎‎驱动:1.应用”ping”命令检查网‎络物理连接‎是否完好。

如果不能”ping”通PLC,请先检查是‎否为PLC‎‎故障,若PLC运‎行正常,请检查网络‎连接包括用‎测线器检查‎网线制作有‎没有问题,光电转换器‎,交换机,光纤等是否‎存在问题。

2.确认网络连‎接没有问题‎后,运行MBE‎‎-POWER‎‎T OOL,直接选择”DataB‎l ock”块,选择”Stati‎‎s ti cs‎‎”查看当前D‎‎ataBl‎o ck状态‎。

如果Dta‎‎t a项显示‎不是”Good”,请检查” Chann‎e l”,” Devic‎e”,” DataB‎l ock”的”Enabl‎‎e”复选框是否‎选中;”Chann‎e l”中,主备网卡选‎择是否正确‎;” Devic‎e”的IP地址‎是否配置正‎确,PLC中确‎实有这些地‎址;” DataB‎l ock”块中开始和‎结束地址是‎否正确;打开的*.mbe 文件‎与IFIX‎‎节点名是否‎一致;Optio‎‎n s->Setup‎‎->Defau‎‎l t Path中‎的节点名和‎路径是否配‎置正确等问‎题。

ifix使用中遇到的问题

ifix使用中遇到的问题

问题1.IFIX在导入数据库时出现如下图所示:解决方法:到ifix安装目录,找到Default.xxx文件,复制到当前工程的PDB目录,重启iFIX,就OK 了其他驱动就找对应的Default.xxx文件,xxx-驱动名称;如MBE,OPC RSLinx等等。

其实在每个驱动的安装说明里都有说明的。

现拿s7a驱动器举例:这个节点名称.s7a 是不能弄丢的。

A configuration file named default.S7A is saved in the root Dynamics directory when you install the driver. If you are using FIX the file resides in the Database path (C:\FIX32\PDB, by default). Do not delete this file. FIX and iFIX use this file to load the driver.If you subsequently change the name of your SCADA server after installing the S7A driver, FIX cannot automatically start the driver because the name of the node does not match the name of theconfiguration file. To correct this, rename the configuration file to match the name of your SCADA server. For example, if you change the name of the SCADA server from SCADA1 to SCADA9, rename the configuration file from SCADA1.S7A to SCADA9.S7A.。

IFIX问题处理

IFIX问题处理

IFIX冗余服务器配置IFIX冗余服务器配置 (2)IFIX冗余服务器数据源的切换 (5)历史报警的查询(这里只做出来在客户机上生成的) (7)历史数据时间保存一年。

(12)冗余服务器历史数据同步。

(12)当服务器切换时,客户机的历史趋势仍然能切换。

(12)2 1................................................................................................... 自动运行。

IFIX计算机启动时.IFIX冗余服务器配置首先配置—网络如图所示添加远程节点名,然后点击配置见如图所示。

然后配置-SCADA组态,如图所示,SCADA邻居为SER02然后配置—本地启动,见如图所示,本地节点名为SER01,本地逻辑节点名为IFIX最后更改C:\WINDOWS\system32\drivers\etc目录下的hosts文件用记事本打开更改如下图所示其中圈里面的东西为增加的地方,包含两个冗余服务器,五个客户机。

至此主服务器的配置就完成了。

备服务器配置更改与主服务器类似。

只是需要注意SCADA邻居为SER01,本地节点名需为SER02。

其他不需要更改。

客户机的配置禁用SCADA支持为例)4(以客户机CL4本地启动需更改为如图所示,本地节点名和本地逻辑节点名均为其他配置和服务器一样,包括网络配置和更高hosts文件。

到这里IFIX冗余服务器的系统配置完成。

IFIX冗余服务器数据源的切换当客户机与主服务器连接丢失时,系统会自动切换到备用的服务器,达到自动切换的效果,果然主服务器这时候恢复正常,不会自动切换回主服务器(可以自动切换不推荐),此时如果需要切换回去,能够在操作站画面上手动的方式切换。

效果图如上图所示,代表此时连接的是SER01的数据源,SER01与SER02都正常。

点击中间的按钮可以实现SER01和SER02的手动切换。

iFIX高级培训第10讲 iFIX故障排除

iFIX高级培训第10讲 iFIX故障排除

报警状态 (AlmStat.Exe)
提供报警队列信息,以及C/S网络结构连接的信息 提供报警队列信息,以及C/S网络结构连接的信息
网络状态显示
iFIX工作台的一个默认画面,显示网络连接状态( iFIX工作台的一个默认画面,显示网络连接状态( NetworkStatusOverview.grf, NetworkStatusDisplay.grf, NetworkStatusRedundancyDisplay.grf )
轮询监控 (Pmon.Exe)
高级工具,监视DIT,监控轮询记录和I/O驱动 高级工具,监视DIT,监控轮询记录和I/O驱动
极易iFIX网站出品()

网络历史 (NetHis.Exe)
显示所有已经建立或者丢失的网络连接
网络诊断 (NetDiag.Exe)
提供网络和报警信息的高级工具 所有信息保存在文件 NetDiag.dat中 NetDiag.da接状况
任务控制 (Mission.Exe)
实时监视I/O 驱动, 实时监视I/O 驱动, SAC, 历史数据采集以及报警状态
如何分析故障 故障检测工具 本讲对应教材第19章 本讲对应教材第19章
极易iFIX网站出品()
iFIX高级培训
主讲:钱立湘
第10讲 iFIX故障排除 10讲 iFIX故障排除
分析故障 按iFIX的结构分析 iFIX的结构分析 1. 驱动 2. 过程数据库 3. 画面(脚本,控件引用) 画面(脚本,控件引用) 采用排除法
报警历史 报警状态 网络状态 网络历史 网络诊断 TCP测试 TCP测试 任务控制 轮询监视
极易iFIX网站出品()
iFIX高级培训
主讲:钱立湘
第10讲 iFIX故障排除 10讲 iFIX故障排除

iFIX启动时的几种常见问题及解决方法

iFIX启动时的几种常见问题及解决方法

iFIX启动时的几种常见问题及解决方法青青子衿QQ:262399第一个现象:启动iFIX,出现下述提示:故障原因:出现上面的提示是因为打开的工程目录与备份时的目录不同。

解决方法:最简单的就是将备份恢复到原来的路径中。

可以通过下面的方法打开SCU看到路径。

如果想恢复到其它的路径中,按下面的方法做:1)打开下面这个界面,运行SCU:2)打开你备份的SCU文件:3)我的这个例子中,原来的程序是放在F盘中,现在将备份恢复到了D盘。

因此,在SCU 中的路径中看到的是F盘。

4)修改项目路径为D:\IFIX\XHUA,注意,不要修改根目录和语言的路径:上图中只修改了项目的路径。

5)点下面的更改项目按钮,提示如下图:选否。

保存SCU。

第二种现象:运行工程后,提示如下:如果点确定后,再运行,则提示。

故障原因:出现这个提示,很多人认为是没有启用安全。

其实不是这样的,工程的安全如果备份前是启用的,备份后也是启用的。

真正的原因是当前打开的工程的安全配置路径和备份的工程安全配置路径不相同。

安全配置和SCU是两个完全不同的应用程序,安全配置是保存在A TCOMPAT.UTL和XTCOMPAT.UTL中的,因此通过修改SCU的工程路径是不能修改到这两个文件的。

要手动修改安全配置路径。

通过下图可以看出,直接打开工程的SCU,安全配置是灰色的,不能修改。

如果运行iFIX,又提示安全未启用,进不了安全配置。

解决方法:最简单的当然还是将备份恢复到原来的路径中。

如果恢复到了其它路径中,按下面的方法解决。

1. 随便新建个工程,不要用演示系统和iFIX自带的工程(原因下面再说),进入SCU 配置中打开你的工程的SCU文件,进入安全配置,会看到下图:F:\AAA\LOCAL是我随便建的一个空工程。

2. 修改安全路径和备份路径为你要打开工程的LOCAL路径,启用和禁止不用管,你原来的工程是什么,会自动调整。

我的工程放在D:\IFIX\XHUA下。

IFIX历史趋势图问题

IFIX历史趋势图问题

IFIX历史趋势图问题第一篇:IFIX历史趋势图问题IFIX 历史趋势图起始时间问题解决方案IFIX演示工程上的趋势图功能强大及使用,一般在做工程时会借鉴里面的画面及控件。

简单的把画面拷贝到新的工程总会出现很多问题,功能不能实现,VBA脚本报错等问题。

先做一个工程借用演示工程的趋势图出现一个起始时间不能设置的问题,添加历史曲线后只能看最新的曲线,看前几天曲线时要一点一点的往前翻,而不能直接选择时间查看当天。

实例所带的是VBA的一个窗口,使用下拉框控件,该空间显示为short的日期,在该处选择日期,在演示工程中使用很好,拷贝到新工程就不可以了,而且报错。

先讨论一下该日期的来源:我们做历史数据时可以设置保存数据格式4小时,8小时,24小时等。

相应历史数据文件会保存到..HATDATAFIX文件夹中。

然后通过FindHistoricalFiles函数进行查找,该函数会自动查找..HATDATAFIX文件夹下的文件名称,读取文件名提取日期保存到变量中赋值给日期选择下拉列框。

演示系统函数会默认读取安装模块所带默认工程中的数据。

当新建工程是工程文件可能会改变。

会发现下拉列框中没有实际保存的数据。

而且FindHistoricalFiles函数在演示系统中实在project_user的modhistoricalFiles模块中进行定义的,想正确使用必须从演示系统中导出,在新系统中导入并且修改,较为繁琐。

如该函数正确使用,会发现历史文件越来越多,函数读取的文件名称越多,下拉列框的数据也会越来越多,不方便操作解决方案:1.在CFixPicture_Initialize()过程中将图片对象(Chart Object)起始时间srtChartStartDT=FindHistoricalFiles(“THISNODE”)(0),修改为srtChartStartDT=NOW, 2.日期选择控件使用DTPicker代替下拉列框做为趋势图时间选择。

IFIX问题处理【精选文档】

IFIX问题处理【精选文档】

IFIX冗余服务器配置IFIX冗余服务器配置 (2)IFIX冗余服务器数据源的切换 (5)历史报警的查询(这里只做出来在客户机上生成的) (7)历史数据时间保存一年。

(12)冗余服务器历史数据同步。

(12)当服务器切换时,客户机的历史趋势仍然能切换。

(12)计算机启动时IFIX自动运行。

(12)IFIX冗余服务器配置首先配置—网络如图所示添加远程节点名,然后点击配置见如图所示。

然后配置-SCADA组态,如图所示,SCADA邻居为SER02然后配置—本地启动,见如图所示,本地节点名为SER01,本地逻辑节点名为IFIX 最后更改C:\WINDOWS\system32\drivers\etc目录下的hosts文件用记事本打开更改如下图所示其中圈里面的东西为增加的地方,包含两个冗余服务器,五个客户机。

至此主服务器的配置就完成了。

备服务器配置更改与主服务器类似。

只是需要注意SCADA 邻居为SER01,本地节点名需为SER02.其他不需要更改.客户机的配置禁用SCADA支持本地启动需更改为如图所示,本地节点名和本地逻辑节点名均为CL4(以客户机4为例)其他配置和服务器一样,包括网络配置和更高hosts文件。

到这里IFIX冗余服务器的系统配置完成。

IFIX冗余服务器数据源的切换当客户机与主服务器连接丢失时,系统会自动切换到备用的服务器,达到自动切换的效果,果然主服务器这时候恢复正常,不会自动切换回主服务器(可以自动切换不推荐),此时如果需要切换回去,能够在操作站画面上手动的方式切换.效果图如上图所示,代表此时连接的是SER01的数据源,SER01与SER02都正常。

点击中间的按钮可以实现SER01和SER02的手动切换。

当主服务器故障时,系统会自动切换到SER02,如图所示此时代表SER01与该客户机通信故障,接收的是SER02的数据源。

当主服务器恢复后不会自动切换回(可以自动切换,但是不推荐,因为IFIX如果是服务器与PLC通信故障是不会达到切换的效果的,此时需要手动切换)手动切换方法:新建一个如图所示的画面(参见系统自带画面LocalAsPrimary。

IFX新建注意问题

IFX新建注意问题

IFX问题08.12.22
1.当ifix拷贝到新电脑上时,不用先急着删之前的工程,应该先在SCU中配置
本地启中修改本地节点名跟组态文件路径.
a)本地节点名: 为scu名字一样.
b)本地逻辑节点名: 在做冗余上位机时使用.
c)组态文件: 就时scu文件所在的文件夹路径.
2. 打开RSLinx 新建TOPIC{注:TOPIC是指IFIX数据库中I/O地址中的中括号”[TOPIC]”的主题
} 找到CPU然后指向下DONE
有锁表示锁定状态,不让修改参数
也就是说有数据有交换
2.OPC设置
a)打开ifix OPC 选择(Options)中设置(Setup)中自定义路径中设置组态文
件及路径如下图:
b)在高级选项(Advanced)中激活中选中i/o设置中选择on如下图:
报警配置
要是创建不了表格那么要先到控制面板---性能和维护---管理工具---数据源(ODBC)添加
取名为Ifix_Alarm 数据库中选择路径选中工程中的文件夹Access
路径选择。

iFIX常见问题

iFIX常见问题

iFIX常见问题1:iFIX中如何使用vba开启和停止wsqlodc和alarmsODBC?DescriptionThe ability to stop or start the SQL task, wsqlodc, and to pause or continue the alarms toODBC task used to only be available by launching Mission Control and manually controlling them.The ability to perform this control programmatically using VBA was added as part of a SIM foriFix 2.5. The function calls to allow this are not widely documented and are shown below: -ResolutionDeclare Function TurnOnSqlTask Lib "missionvba" (ByVal cmd$) As Long'Turns on a SQL task. The cmd$ parameter is the command line passed to the SQL task 'Return of 0 is a success. Current logged in user must have 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 TurnOffSqlTask Lib "missionvba" () As Long'Turns off a SQL task. Return of 0 is a success. Current logged in user must 'have 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 Long'Pauses the AlarmODBC task. Return of 0 is a success. Current logged in user does NOT 'have to have security rights.'This function will execute regardless of the "Allow Operator to Pause Alarm Logging" 'Setting found in the iFIX ODBC Alarm Service Configurator of the System Configuration 'Utility.Private Declare Function ContinueAlarmODBC Lib "missionvba" () As Long'Resumes the AlarmODBC task. Return of 0 is a success. Current logged in user does NOT'have to have security rights.'This function will execute regardless of the "Allow Operator to Pause Alarm Logging" 'Setting found in the iFIX ODBC Alarm Service Configurator of the System Configuration 'Utility.'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 schedulerunning in the background.Resolution:STOP / 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_Click()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 ObjectSet 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.TimerEnabled = TrueVar2.StartTimerEnd Sub3:iFIX如何使用vba进行网络打印机打印?Description:The following is an example of printing an Excel Document to a Network Printer or a printer other than thedefault printer on the machine.Dim objXL As ObjectDim myDoc As ObjectSet objXL = CreateObject("Excel.Application")Set myDoc = objXL.Workbooks.Open("C:\testfile.xls", , True)myDoc.Printout copies:=1, preview:=False, ActivePrinter:="'\\SERVER\PRINTER", printtofile:=False, collate:=TruemyDoc.CloseSet objXL = NothingSet myDoc = NothingReferencesIf this script is used in a background schedule with FixBackgroundServer configured to run as a Service, the Fixservice must 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报警状态代码以及意义?Description: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 --> Any 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 --> 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 String''Variables for GetChannel Dim lngNumChannels As Long Dim lngChanHandlesDim strChanNames''Variables for GetDevices Dim lngNumDevices As Long Dim lngDeviceHandlesDim strDeviceNames''Variables for GetDataBlocks。

iFix中MB1驱动器64位字交换浮点数的处理2

iFix中MB1驱动器64位字交换浮点数的处理2

iFix中MB1驱动器64位字交换浮点数的处理0、看了KroHne流量计关于浮点数计算式后,方知本文原计算方法太麻烦,引用新的计算方法对本文更正之。

一、问题的提出对IFC050流量计进行读数据试验,首先使用Modscan32,读出数据要么瞬时流量不对,要么累积值不对,查手册知,流量瞬时值为32位字交换浮点数,累积值为64位字交换浮点数,分别适用不同的格式显示数据,它们都是正确的。

因为都是Modbus协议,所以我们认为iFix使用MB1驱动也能够正确读出数据。

但在实际使用iFix中MB1驱动器读IFC050流量计的累积值时,发现驱动器关于64位浮点数只支持一个Float64,再无其它64位浮点数格式。

同时在数据库的数据块配置之硬件选项中,64位浮点数也只有一个Float64,再无其它64位格式。

照此配置,原本百万的数值在iFix显示为-0.0。

就这还有一段话: NOTE: The FIX database handles up to 32-bit values. Consequently, 64-bit values are converted to 32-bit before being stored in the process database. 意思是数据库只支持32位,64位的数据进数据库前转换成32位。

似乎没法了!联想到Float和WFloat是高低字位置交换了,而Modscan32读出的累积值使用的是WFloat64,高低字交换了,这个问题实际上是数据存放顺序造成的。

那么,只要知道原始数据的存放方式,好像还可以通过脚本处理这一问题。

Modscan可以以各种方式显示数据,改变数据显示方式,很容易找到原始数据的存储方式。

二、浮点数的表示32位浮点数的标准格式IEEE754其值为:x=(-1)S×(1.M)(E-127)64位浮点数的标准格式IEEE75463 62 52 51 0其值为:x=(-1)S×(1.M)(E-1023)其中:S--尾数符号,0正1负;E--阶码,采用移码表示(移码可表示阶码符号)。

iFix__常见问题汇总

iFix__常见问题汇总

Proficy HMI/SCADA – iFix常见问题汇总Proficy HMI/SCADA – iFix1 Standard/Plus/Professional版本说明2 通讯正常,但是画面和数据库一些或是所有标签显示问号3 禁止报错对话框4 安装iFIX并且插上狗以后,启动iFIX,仍然以运行模式启动5 iFIX 2.6更换硬件狗以后,不能检测到硬件狗6 做趋势图的显示的时候,历史库为Proficy Historian,而不是iFIX的历史数据库7 直接使用VisiconX查询Proficy Historian的历史数据8 Windows XP中,安装iFIX之后,重新启动计算器,新建用户:FixIOUser9 数据库中,如何计算点数10 I/O驱动通讯不正常或是无法正常通讯11 iFIX PDB中添加数据块地址时,出现“无法加载驱动映像表”错误信息。

12 iFix提供哪些方式与关系数据库连接相连?13 PLUS 版本与CLIENT 版本的区别14 iFIX数据连接精度不准的解决方法15 iFIX的画面转换为Portal16 PDB作为DDE Server,DDE Client 获得数值,小数位为两位17 运行状态,在画面中修改标签的报警范围18 硬件狗能够检测到,但仍然以运行模式运行/ 运行时可检测到硬件狗,但是使用iKeyDiag.exe检测不到狗的信息19 基于时间的调度没有在设定的时间点触发,有几秒或是几十秒的延时20 全局变量无法在后台运行的调度中使用21 AlarmODBC中,字段alm_timein的含义22 数据库的值显示为问号,但是驱动器收发状态正常23 驱动无法连接硬件24 Error:The license didn‘t have Historian Collect function25 外部程序访问iFix中的实时报警信息26 iFix启动错误:应用要求32 位扩展27 过滤iFIX 中出现的错误28 报警一览控件(Alarm Summary)最多可以设置的过滤条件29 抑制通讯报警(COMM)30 在多显示器上,全屏显示画面31 iFIX数据库量程转换无法实现。

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

IFIX冗余服务器配置
IFIX冗余服务器配置 (2)
IFIX冗余服务器数据源的切换 (5)
历史报警的查询(这里只做出来在客户机上生成的) (7)
历史数据时间保存一年。

(12)
冗余服务器历史数据同步。

(12)
当服务器切换时,客户机的历史趋势仍然能切换。

(12)
计算机启动时IFIX自动运行。

(12)
IFIX冗余服务器配置
首先配置—网络如图所示添加远程节点名,然后点击配置见如图所示。

然后配置-SCADA组态,如图所示,SCADA邻居为SER02
然后配置—本地启动,见如图所示,本地节点名为SER01,本地逻辑节点名为IFIX
最后更改C:\WINDOWS\system32\drivers\etc目录下的hosts文件
用记事本打开更改如下图所示
其中圈里面的东西为增加的地方,包含两个冗余服务器,五个客户机。

至此主服务器的配置就完成了。

备服务器配置更改与主服务器类似。

只是需要注意SCADA 邻居为SER01,本地节点名需为SER02。

其他不需要更改。

客户机的配置
禁用SCADA支持
本地启动需更改为如图所示,本地节点名和本地逻辑节点名均为CL4(以客户机4为例)
其他配置和服务器一样,包括网络配置和更高hosts文件。

到这里IFIX冗余服务器的系统配置完成。

IFIX冗余服务器数据源的切换
当客户机与主服务器连接丢失时,系统会自动切换到备用的服务器,达到自动切换的效果,果然主服务器这时候恢复正常,不会自动切换回主服务器(可以自动切换不推荐),此时如果需要切换回去,能够在操作站画面上手动的方式切换。

效果图如上图所示,代表此时连接的是SER01的数据源,SER01与SER02都正常。

点击中间的按钮可以实现SER01和SER02的手动切换。

当主服务器故障时,系统会自动切换到SER02,如图所示
此时代表SER01与该客户机通信故障,接收的是SER02的数据源。

当主服务器恢复后不会自动切换回(可以自动切换,但是不推荐,因为IFIX如果是服务器与PLC通信故障是不会达到切换的效果的,此时需要手动切换)
手动切换方法:
新建一个如图所示的画面(参见系统自带画面LocalAsPrimary.GRF、但是在客户机上需更改)
更改的部分为原画面中所有的标签后缀_0更改为_1,且脚本的也要进行相应的修改。

这里就解决了冗余服务器手动选择数据源和显示当前连接的服务器的名称的问题历史报警的查询(这里只做出来在客户机上生成的)
如图所示效果图
步骤:
A、ODBC服务的连接
在D:\CMIFIX\HTRDATA目录下新建一个Access取名为hisdata.mdb
开始-设置-控制面板-管理工具-数据源ODBC
选用户DNS-添加-选
数据源名:hisdata
选数据库名:hisdata.mdb, 文件类型:Access,连接池-禁止
B、系统SCU的配置
SCU-IFIX-配置-报警-报警ODBC服务,启动-修改-配置:数据库类型:Access 数据库标识符:hisdata
现在创建表:FIXALARMS(默认表名)
其它默认-确定
C、控件的引用
新建画面画面名为ifix_alarm_history
1.日期时间控件
典型装VB6.0后, 双击选Microsoft date and time picker控件(需注册控件
方法为:将该文件拷贝到C:\WINDOWS\system32目录下,
然后运行该代码为
regsvr32.exe MSCOMCT2.OCX)
2个日期控件-属性-格式:1-dtpShortDate,有效前不打勾。

其它默认,
2个时间控件-属性-格式:2-dtpTime, 有效前不打勾。

其它默认
2.vxData控件(数据管道)
IFIX4.0工具箱底部vxData图标
右键-属性vxData对象-
提供者:Microsoft OLE DB Provider for ODBC Drivers
数据库:DNS名:Myalarm,用户名密码选项均空---测试连接-测试连接成功-确定记录源:命令类型:SQL命令
应用-确定
3.vxGrid控件(显示)
工具箱底部vxGrid图标
选控件 vxGrid1-右键-动画-高级-高级动画配置-行为-ADORecords-动画打勾数据源:ifix_alarm_history.vxData1.ADORecords
数据转换:对象
D、VBA脚本:
'初始化设置
Private Sub CFixPicture_Initialize()
'设定默认开始时间
Me.DTPFromDate = DateAdd("d", -1, Now)
Me.DTPFromTime = ("00:00:00")
'设默认结束时间
Me.DTPEndDate = Now
Me.DTPEndTime = Now
End Sub
Private Sub CFixPicture_KeyDown(ByVal KeyCode As Long, ByVal Shift As Long, ContinueProcessing As Boolean)
End Sub
‘查询按钮脚本
Private Sub CmbSearch_Click()
'连接自动刷新
Me.vxData1.AutoRefresh = True
'Format函数用于设定时间格式
vxData1.QP1 = Format(Me.DTPFromDate.Value, "yyyy-MM-DD") & " " & Format(Me.DTPFromTime.Value, "HH:MM:SS")
vxData1.QP2 = Format(Me.DTPEndDate.Value, "yyyy-MM-DD") & " " &
Format(Me.DTPEndTime.Value, "HH:MM:SS")
'设定查询内容
'从数据库中查询符合时间段的数据
Me.vxData1.SQLCommand = "SELECT *FROM FIXALARMS WHERE" & "(FIXALARMS.ALM_NATIVETIMEIN>={ts'QP1'})AND(FIXALARMS.ALM_NATIVETIMELAST <= {ts 'QP2'})"
'刷新数据
Me.vxData1.Refresh
Me.vxGrid1.Refresh
End Sub
其中黄色部分注意和画面中控件的名称对应,完成后可在任务控制中看有没有数据写入到数据库里面
连接状态:连接、记录状态:激活如图所示表示成功记录到数据库中,这里就可以在画面中选择时间,然后点击查询。

历史数据时间保存一年。

历史库定义里面有一个自动删除旧的数据文件打上勾,然后时间选择多少天,最多200天。

然后每天的数据大小需要运行一天后看(GE支持说的没办法通过计算)。

冗余服务器历史数据同步。

当服务器切换时,客户机的历史趋势仍然能切换。

(暂时没办法弄,由于时间关系我这里做的是历史趋势,包括历史报警都存在客户机上。


计算机启动时IFIX自动运行。

在IFIX没打开的环境下,启动系统配置—配置---本地启动
将注销后继续运行与系统引导时启动IFIX勾上。

然后进入IFIX后点击工作台—用户首选项---常规将按运行模式启动工作台、运行模式下全屏显示勾上
然后选择启动画面,选择启动的第一副画面。

相关文档
最新文档