iFIX常见问题集合Word格式.docx

上传人:b****4 文档编号:16951561 上传时间:2022-11-27 格式:DOCX 页数:19 大小:24.40KB
下载 相关 举报
iFIX常见问题集合Word格式.docx_第1页
第1页 / 共19页
iFIX常见问题集合Word格式.docx_第2页
第2页 / 共19页
iFIX常见问题集合Word格式.docx_第3页
第3页 / 共19页
iFIX常见问题集合Word格式.docx_第4页
第4页 / 共19页
iFIX常见问题集合Word格式.docx_第5页
第5页 / 共19页
点击查看更多>>
下载资源
资源描述

iFIX常见问题集合Word格式.docx

《iFIX常见问题集合Word格式.docx》由会员分享,可在线阅读,更多相关《iFIX常见问题集合Word格式.docx(19页珍藏版)》请在冰豆网上搜索。

iFIX常见问题集合Word格式.docx

//havetohavesecurityrights.

//Thisfunctionwillexecuteregardlessofthe"

AllowOperatortoPauseAlarmLogging"

//SettingfoundintheiFIXODBCAlarmServiceConfiguratoroftheSystemConfiguration

//Utility.

PrivateDeclareFunctionContinueAlarmODBCLib"

//ResumestheAlarmODBCtask.Returnof0isasuccess.CurrentloggedinuserdoesNOT

//Allofthesefunctionswillblockuntiltherequestiscompleted.

2:

iFIX如何使用vba开启和停止基于时间和事件的调度?

Description:

Thissolutionshowshowtostartandstopatime-basedorevent-basedschedule

runninginthebackground.

Resolution:

STOP/STARTaEVENTBASEDSCHEDULE

ToStart:

PrivateSubCommandButton1_Click()

DimVar1AsObject

DimVar2AsObject

SetVar1=GetObject(,"

FixBackGroundServer.Application"

SetVar2=Var1.System.FindObject("

SchedTest1.FIXEvent1"

Var2.StartEvent

EndSub

ToStop:

Var2.StopEvent

STOP/STARTaTIMEBASEDSCHEDULE

ToStoptheTimerObject:

SetVar1=GetObject(,"

Sched1.Timer1"

Var2.TimerEnabled=False

ToStarttheTimerObject:

PrivateSubCommandButton2_Click()

sched.Timer1"

Var2.TimerEnabled=True

Var2.StartTimer

EndSub

3:

iFIX如何使用vba进行网络打印机打印?

ThefollowingisanexampleofprintinganExcelDocumenttoaNetworkPrinteroraprinterotherthanthe

defaultprinteronthemachine.

DimobjXLAsObject

DimmyDocAsObject

SetobjXL=CreateObject("

Excel.Application"

SetmyDoc=objXL.Workbooks.Open("

C:

estfile.xls"

,True)

myDoc.Printoutcopies:

=1,preview:

=False,ActivePrinter:

="

//\SERVERPRINTER"

printtofile:

=False,collate:

=True

myDoc.Close

SetobjXL=Nothing

SetmyDoc=Nothing

References

IfthisscriptisusedinabackgroundschedulewithFixBackgroundServerconfiguredtorunasaService,theFix

servicemustrununderauseraccountthathasprintersdefined.SeeKnowledgeBaseArticlei013417formore

informationonthisconfiguration.

ThePrintoutcommandcanbeusedforotherdocumenttypes(Word,PowerPoint,etc),howeverdifferentsyntax

isrequired,refertoforotherexamples.

4:

iFIX报警状态代码以及意义?

FIXdisplaysalarmstatuscodesforeachalarmintheAlarmSummaryLink.Whatisthemeaningofeachofthesecodes?

Priority-->

AlarmType-->

Description

1-->

COMM-->

CommunicationError("

BAD"

value)

OCD-->

Opencircuitdetected

OVER-->

OverRange

UNDER-->

UnderRange

ERROR-->

AnyStatisticalDatablockalarm

2-->

CFN-->

Changefromnormalalarm(digitalblocksonly)

COS-->

ChangeofStatealarm(digitalblocksonly)

HIHI-->

BlockinHIHIalarmstate

LOLO-->

BlockinLOLOalarmstate

3-->

RATE-->

Valueexceedsrate-of-changesetting

HI-->

BlockinHIalarmstate

LO-->

BlockinLOalarmstate

4-->

DEV-->

DeviationAlarm

5-->

OK-->

Blockinnormalstate

5:

如何禁止和使能7X驱动标签点(对驱动自动禁止特别有用)?

DimopcDriverAsNewOPCDrv.OPCServer

DimobjDriverAsObject

DimstrDRVAcronymAsString

DimstrProgIdAsString

////VariablesforGetChannel

DimlngNumChannelsAsLong

DimlngChanHandles

DimstrChanNames

////VariablesforGetDevices

DimlngNumDevicesAsLong

DimlngDeviceHandles

DimstrDeviceNames

////VariablesforGetDataBlocks

DimlngNumDataBlocksAsLong

DimlngDataBlockHandles

DimstrDataBlockNames

DimiAsInteger

DimjAsInteger

DimlngErrors

DimmyvarAsLong

DimreadEnable

//strDRVAcronym=InputBox("

Pleaseenterthedriver////sthreeletteracronym?

"

&

vbCrLf&

"

(ForExample:

EnterABRfortheABRDriver)"

"

WhatDriverareyouusing?

//strProgId="

Intellution."

strDRVAcronym&

drv"

Matrikon.OPC.Simulation.1"

//SetobjDriver=CreateObject(strProgId)

lngNumChannels=opcDriver.GetChannels(lngChanHandles,strChanNames)

////BuildVariablesforSetPropertyDatafunction.

lngHandle=lngDataBlockHandles(0)

varProperties="

Enabled"

varProperyData="

1"

opcDriver.GetPropertyDatalngChanHandles

(1),varProperties,readEnable

//对服器1置真

IfreadEnable="

0"

Then

lngErrors=opcDriver.SetPropertyData(lngChanHandles

(1),varProperties,varProperyData)

EndIf

lngNumDevices=opcDriver.GetDevices(lngChanHandles

(1),lngDeviceHandles,strDeviceNames)

lngNumDataBlocks=opcDriver.GetDataBlocks(lngDeviceHandles(0),lngDataBlockHandles,strDataBlockNames)

//读工作组

opcDriver.GetPropertyDatalngDeviceHandles(0),varProperties,readEnable

lngErrors=opcDriver.SetPropertyData(lngDeviceHandles(0),varProperties,varProperyData)

//处理工作块

opcDriver.GetPropertyDatalngDataBlockHandles(0),varProperties,readEnable

Fori=0To1

lngErrors=opcDriver.SetPropertyData(lngDataBlockHandles(i),varProperties,varProperyData)

Nexti

SetopcDriver=Nothing

6:

iFIX_如何使用脚本实现驱动(7x)的启动和停止?

ThefollowingsolutionexplainshowtoStartandStopa7.xdriverthroughVBAcode.Thisexampleuses

theABRdriver.Toimplementthiswithanother7.xdriver,changetheABRtothethreeletteracronymof

theotherdriverandswitchthereferencetothatdriver.

Thiscodewillonlyworkwith7.xdrivers.Ifyouwanttoimplementthisiscodeinanewpictureyou

needtosetareferencetoIntellutionABRDrvOPCServer7.20Library.Tosetareference,usethefollowingsteps:

1)OntheToolsmenuintheVBEditorchooseReferences.

2)SelecttheIntellutionABRDrvOPCServer7.20Libraryfromthelist.

AddtwocommandbuttonstoyourpictureandnamethemcmdStart_ClickandcmdStop_Click.

Thenpastethefollowingcodeintothepicture:

PrivateSubcmdStart_Click()

DimABRDriverAsNewABRDrv.ABRServer

ABRDriver.Stop

SetABRDriver=Nothing

PrivateSubcmdStop_Click()

ABRDriver.Start

7:

iFIX_如何使用脚本实现驱动(6x)的启动和停止?

Thisarticlesdescribeshowtocontrol(startorstop)the6.xdriversthroughVBA,CommandScript,

orDOSratherthaninMissionControl.

TheattachedapplicationDCTRL61.EXEenablesyoutodothis.Belowaretheusageinstructions.

Usage:

DCTRLcommanddriveracronymdelay[sleep]

wherecommandis:

START-startthedriver

STOP-stopthedriverfrompolling

STOP_EXIT-stoppollingandexit

SLEEP-setnewsleeptime(period)

STATUS-displayscurrentvalues

DELAY-WaitaNumberofmillisecondsbeforeexecutingthiscommand(1000=1second).

Thethedctrl61.exemustbelocatedintheFIX32orDynamicsdirectory.Thecommandanddriver

acronymmustbeinALLCAPS.

ExamplefromtheDOSprompt:

dctrl60STARTMBR

ExamplefromaiFIXVBA:

Shellc:

fix32dctrl60"

STARTMBR"

ExamplefromaFIX32script:

Runtaskc:

8:

iFIX_脚本进行调度的启动和关闭方法?

Thissolutionshowshowtostartandstopatime-basedorevent-basedschedulerunninginthebackground.

Se

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 初中教育 > 语文

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

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