IDEC FC5A User manual

Type
User manual
FC5A SERIES
FC9Y-B1273(2)
Users Manual Advanced Volume
FC5AMicroSmartUser’sManual FC9YB1273 Preface1
SAFETYPRECAUTIONS
•Readthisusersmanualtomakesureofcorrectoperationbeforestartinginstallation,wiring,operation,maintenance,
andinspectionoftheMicroSmart.
•AllMicroSmartmodulesaremanufacturedunderIDECsrigorousqualitycontrolsystem,butusersmustaddabackupor
failsafeprovisiontothecontrolsystemwhenusingtheMicroSmartinapplicationswhereheavydamageorpersonal
injurymaybecausedincasetheMicroSmartshouldfail.
•Inthisusersmanual,safetyprecautionsarecategorizedinorderofimportancetoWarningandCaution:
•TurnoffpowertotheMicroSmartbeforeinstallation,removal,wiring,maintenance,andinspectionoftheMicroSmart.
Failuretoturnpoweroffmaycauseelectricalshocksorfirehazard.
•Specialexpertiseisrequiredtoinstall,wire,program,andoperatetheMicroSmart.Peoplewithoutsuchexpertisemust
notusetheMicroSmart.
EmergencystopandinterlockingcircuitsmustbeconfiguredoutsidetheMicroSmart.Ifsuchacircuitisconfiguredinside
theMicroSmart,failureoftheMicroSmartmaycausedisorderofthecontrolsystem,damage,oraccidents.
•InstalltheMicroSmartaccordingtotheinstructionsdescribedinthisusersmanual.Improperinstallationwillresultin
falling,failure,ormalfunctionoftheMicroSmart.
•TheMicroSmartisdesignedforinstallationinacabinet.DonotinstalltheMicroSmartoutsideacabinet.
•InstalltheMicroSmartinenvironmentsdescribedinthisusersmanual.IftheMicroSmartisusedinplaceswherethe
MicroSmartissubjectedtohightemperature,highhumidity,condensation,corrosivegases,excessivevibrations,and
excessiveshocks,thenelectricalshocks,firehazard,ormalfunctionwillresult.
•TheenvironmentforusingtheMicroSmartis“Pollutiondegree2.UsetheMicroSmartinenvironmentsofpollution
degree2(accordingtoIEC606641).
•PreventtheMicroSmartfromfallingwhilemovingortransportingtheMicroSmart,otherwisedamageormalfunctionof
theMicroSmartwillresult.
•PreventmetalfragmentsandpiecesofwirefromdroppinginsidetheMicroSmarthousing.PutacoverontheMicroSmart
modulesduringinstallationandwiring.Ingressofsuchfragmentsandchipsmaycausefirehazard,damage,ormalfunc
tion.
•Useapowersupplyoftheratedvalue.Useofawrongpowersupplymaycausefirehazard.
•UseanIEC60127approvedfuseonthepowerlineoutsidetheMicroSmart.Thisisrequiredwhenequipmentcontaining
theMicroSmartisdestinedforEurope.
•UseanIEC60127approvedfuseontheoutputcircuit.ThisisrequiredwhenequipmentcontainingtheMicroSmartisdes
tinedforEurope.
•UseanEUapprovedcircuitbreaker.ThisisrequiredwhenequipmentcontainingtheMicroSmartisdestinedforEurope.
•MakesureofsafetybeforestartingandstoppingtheMicroSmartorwhenoperatingtheMicroSmarttoforceoutputson
oroff.IncorrectoperationontheMicroSmartmaycausemachinedamageoraccidents.
•IfrelaysortransistorsintheMicroSmartoutputmodulesshouldfail,outputsmayremainonoroff.Foroutputsignals
whichmaycauseheavyaccidents,provideamonitorcircuitoutsidetheMicroSmart.
•DonotconnectthegroundwiredirectlytotheMicroSmart.Connectaprotectivegroundtothecabinetcontainingthe
MicroSmartusinganM4orlargerscrew.ThisisrequiredwhenequipmentcontainingtheMicroSmartisdestinedfor
Europe.
•Donotdisassemble,repair,ormodifytheMicroSmartmodules.
•DisposeofthebatteryintheMicroSmartmoduleswhenthebatteryisdeadinaccordancewithpertainingregulations.
Whenstoringordisposingofthebattery,useapropercontainerpreparedforthispurpose.Thisisrequiredwhenequip
mentcontainingtheMicroSmartisdestinedforEurope.
•WhendisposingoftheMicroSmart,dosoasanindustrialwaste.
Warning Warningnoticesareusedtoemphasizethatimproperoperationmaycause
severepersonalinjuryordeath.
Caution Cautionnoticesareusedwhereinattentionmightcausepersonalinjuryordam
agetoequipment.
Preface2FC5AMicroSmartUser’sManual FC9YB1273
RevisionRecord
ThetablebelowsummarizesthechangestothismanualsincethefirstprintingofFC9YB9270inApril,2006.
UpgradedandnewfunctionslistedbelowhavebeenimplementedintheFC5AMicroSmartCPUmodules.Theavailability
ofthesefunctionsdependsonthemodelandthesystemprogramversionoftheFC5AMicroSmartCPUmodules.
ToconfirmthesystemprogramversionoftheMicroSmartCPUmodule,useWindLDRonacomputerconnectedwiththe
CPUmodule.ThesystemprogramversionisindicatedonthePLCStatusdialogbox.Seepage131(BasicVol.).
ToconfirmtheWindLDRversion,selecttheWindLDRapplicationbuttonattheupperleftcorneroftheWindLDRscreen,
followedbyWindLDROptions>Resources.TheWindLDRversionisfoundunderAboutWindLDR.
UpgradedandNewFunctionsList
CPUModule
AllInOneType SlimType
WindLDR Page
FC5AC10R2
FC5AC10R2C
FC5AC10R2D
FC5AC16R2
FC5AC16R2C
FC5AC16R2D
FC5AC24R2
FC5AC24R2C
FC5AC24R2D
FC5AD16RK1
FC5AD16RS1
FC5AD32K3
FC5AD32S3
FC5AD12K1E
FC5AD12S1E(Note1)
HMIModuleUpgrade(Note2) 110orhigher
110orhigher
101orhigher BasicVol.
560
FC5ASIF2ExpansionRS232CCommuni
cationModuleCompatibility(Note3)
110orhigher
5.1or
higher
BasicVol.
286,251
ModbusMasterUpgrade(Note4) — BasicVol.
126
ModbusSlaveUpgrade(Note4)
110orhigher 110orhigher
BasicVol.
1214
32bitDataStorageSetting
5.2or
higher
BasicVol.
546
ForcedI/O
200orhigher 200orhigher 200orhigher
BasicVol.
572
RUNLEDFlashingMode BasicVol.
549
MemoryCartridgeUploadFunction
(Note5)
BasicVol.
293
OffDelayTimerInstructions
(TMLO,TIMO,TMHO,andTMSO)
BasicVol.
711
DoubleWordCounterInstructions
(CNTD,CDPD,andCUDD)
BasicVol.
715
MOVandIMOVInstructionsUpgrade
(NewdatatypeF) 31
NDataSetandNDataRepeatSet
Instructions(NSETandNRS) 313,314
Timer/CounterCurrentValueStore
Instruction(TCCST) 316
CMPInstructionsUpgrade 44
LoadComparisonInstructions
(LC=,LC<>,LC<,LC>,LC<=,andLC>=) 48
BTOAandATOBInstructionsUpgrade
(NewdatatypeD)
89,
812
DataDivide,Combine,andSwap
Instructions(DTDV,DTCB,andSWAP)
821,822,
823
UserCommunicationInstructions
Upgrade(TXDandRXD)
BasicVol.
106,1015
FileDataProcessingInstructions
(FIFOF,FIEX,andFOEX) 191,193
FC5AMicroSmartUser’sManual FC9YB1273 Preface3
Note1:AllfunctionsareavailableonFC5AD12K1EandFC5AD12S1Ewithsystemprogramversion100.
Note2:OptionalHMImodule(FC4APH1)isneededtousethisfunction.
Note3:
ExpansionRS232CandRS485communicationmodules(FC5ASIF2andFC5ASIF4)cannotbeusedwiththeFC5AC24R2DCPUmodule.
Note4:
ModbusMastercommunicationcanbeusedonport2throughport7.ModbusSlavecommunicationcanbeusedonport1through
port7.Optionalcommunicationadapter(FC4APC1orFC4APC3)orcommunicationmodule(FC4AHPC1orFC4AHPC3)isneededtouse
port2.ExpansionRS232CorRS485communicationmodules(FC5ASIF2orFC5ASIF4)areneededtouseport3throughport7.
Note5:Memorycartridge(FC4APM32,FC4APM64,orFC4APM128)isrequiredtousethisfunction.
Note6:KeymatrixinputscannotbeusedontheFC5AC24R2DCPUmodule.
RevisionHistory
KeyMatrixInput(Note6) —
210orhigher 210orhigher 5.3or
higher
BasicVol.
538
UserProgramProtectionUpgrade
210orhigher
BasicVol.
544
ExchangeInstruction(XCHG) 315
IncrementInstruction(INC) 513
DecrementInstruction(DEC) 513
SumInstruction(SUM) 516
RandomInstruction(RNDM)
210orhigher 210orhigher 210orhigher 5.3or
higher
519
DecrementJumpNonzero(DJNZ) 115
NDataSearchInstruction(NDSRC) 195
ClockInstructions
(TADD,TSUB,HTOS,STOH,andHOUR) 201
Allinone12VDCPowerCPUModules —— — BasicVol.
21
AnalogI/OModulesUpgrade
(Version200orhigher) Any Any Any BasicVol.
256
ModbusTCPCommunication
210orhigher 210orhigher 210orhigher 5.3or
higher
231
ModbusSlaveCommunicationforPort1
(Note4)
BasicVol.
1211
Run/StopSelectionatPowerUp 220orhigher
220orhigher 220orhigher 6.2or
higher
BasicVol.
54
FC5ASIF4ExpansionRS485Communica
tionModuleCompatibility(Note3)
BasicVol.
286,251
DataLinkandModbusCommunication
forPort3toPort7(Note4)
BasicVol.
111,121
CommunicationRefreshSelectionfor
Port3toPort7
BasicVol.
543
PIDUpgrade(IntegralStartCoefficient
SupportforProportionalBand) — 246orhigher
246orhigher
(FC5AD16Rx1or
FC5AD32x3)
131orhigher
(FC5AD12x1E)
7.2or
higher 149
Date ManualNo. Description
March,2009 B1138(0) Firstprint
February,2010 B1138(1) Newfunctionsofsystemprogramversion220
ExpansionRS485CommunicationModule(FC5ASIF4)
August,2014 B1138(2) PIDinstructionupgrade:Theintegralstartcoefficientcanbesetwhenthepropor
tionalbandisselected
CPUModule
AllInOneType SlimType
WindLDR Page
FC5AC10R2
FC5AC10R2C
FC5AC10R2D
FC5AC16R2
FC5AC16R2C
FC5AC16R2D
FC5AC24R2
FC5AC24R2C
FC5AC24R2D
FC5AD16RK1
FC5AD16RS1
FC5AD32K3
FC5AD32S3
FC5AD12K1E
FC5AD12S1E(Note1)
Preface4FC5AMicroSmartUser’sManual FC9YB1273
AboutThisManual
ThisusersmanualprimarilydescribesprogrammingandpowerfulcommunicationsoftheMicroSmart.
Chapter1: BasicInstructionsReference
Programmingofthebasicinstructions,availabledevices,andsampleprograms.
Chapter2: AdvancedInstructions
Generalrulesofusingadvancedinstructions,terms,datatypes,andformatsusedforadvancedinstructions.
Chapter3throughChapter20:
Detaileddescriptionsonadvancedinstructionsgroupedinto18chapters.
Chapter21throughChapter25:
Variouscommunicationfunctionssuchascomputerlink,modemmode,ModbusTCP,ASInterface,andexpansion
RS232C/RS485communication.
Index
Alphabeticallistingofkeywords.
IMPORTANTINFORMATION
UndernocircumstancesshallIDECCorporationbeheldliableorresponsibleforindirectorconsequentialdamagesresulting
fromtheuseofortheapplicationofIDECPLCcomponents,individuallyorincombinationwithotherequipment.
Allpersonsusingthesecomponentsmustbewillingtoacceptresponsibilityforchoosingthecorrectcomponenttosuit
theirapplicationandforchoosinganapplicationappropriateforthecomponent,individuallyorincombinationwithother
equipment.
Alldiagramsandexamplesinthismanualareforillustrativepurposesonly.Innowaydoesincludingthesediagramsand
examplesinthismanualconstituteaguaranteeastotheirsuitabilityforanyspecificapplication.Totestandapproveall
programs,priortoinstallation,istheresponsibilityoftheenduser.
FC5AMicroSmartUser’sManual FC9YB1273 Preface5
RELATEDMANUALS
ThefollowingmanualsrelatedtotheFC5AseriesMicroSmartareavailable.Refertotheminconjunctionwiththisman
ual.
TypeNo. ManualName Description
FC9YB1273
FC5ASeries
MicroSmartPentra
User'sManual
AdvancedVolume(thismanual)
Describesbasicinstructionlist,moveinstructions,datacomparisoninstruc
tions,binaryarithmeticinstructions,booleancomputationinstructions,
shift/rotateinstructions,dataconversioninstructions,weekprogrammer
instructions,interfaceinstructions,programbranchinginstructions,refresh
instructions,interruptcontrolinstructions,coordinateconversioninstruc
tions,averageinstructions,pulseoutputinstructions,PIDinstructions,dual/
teachingtimerinstructions,intelligentmoduleaccessinstructions,trigono
metricfunctioninstructions,logarithm/powerinstructions,filedataprocess
inginstructions,clockinstructions,computerlinkcommunication,modem
communication,ModbusTCPcommunication,expansionRS232C/RS485
communicationmodules,andASInterfacemastermodules.
FC9YB1268
FC5ASeries
MicroSmartPentra
User'sManual
BasicVolume
Describesmodulespecifications,installationinstructions,wiringinstructions,
basicoperation,functionsettings,devicelist,basicinstructionlist,basic
instructions,analogmodules,usercommunication,datalinkcommunication,
ModbusASCII/RTUcommunication,andtroubleshooting.
FC9YB1278
FC5ASeries
MicroSmartPentra
User'sManual
WebServerCPUModuleVolume
DescribesFC5ASlimTypeWebServerCPUModulespecificationsandfunc
tions.
FC9YB1283
FC5ASeries
PIDModule
User'sManual
DescribesPIDModulespecificationsandfunctions.
Preface6FC5AMicroSmartUser’sManual FC9YB1273
FC5AMICROSMARTUSERSMANUAL FC9YB1273 i
TABLEOFCONTENTS
CHAPTER1:BasicInstructionsReference
BasicInstructionList.................................................................11
CHAPTER2:AdvancedInstructions
AdvancedInstructionList.............................................................21
AdvancedInstructionApplicableCPUModules...........................................24
StructureofanAdvancedInstruction...................................................27
InputConditionforAdvancedInstructions...............................................27
SourceandDestinationDevices........................................................27
UsingTimerorCounterasSourceDevice................................................27
UsingTimerorCounterasDestinationDevice............................................27
DataTypesforAdvancedInstructions(IntegerType)......................................28
DiscontinuityofDeviceAreas.........................................................210
NOP(NoOperation)................................................................210
CHAPTER3:MoveInstructions
MOV(Move).......................................................................31
MOVN(MoveNot)..................................................................35
IMOV(IndirectMove)................................................................36
IMOVN(IndirectMoveNot)...........................................................38
BMOV(BlockMove).................................................................39
IBMV(IndirectBitMove)............................................................310
IBMVN(IndirectBitMoveNot).......................................................312
NSET(NDataSet)..................................................................313
NRS(NDataRepeatSet).............................................................314
XCHG(Exchange)...................................................................315
TCCST(Timer/CounterCurrentValueStore).............................................316
CHAPTER4:DataComparisonInstructions
CMP=(CompareEqualTo)............................................................41
CMP<>(CompareUnequalTo).........................................................41
CMP<(CompareLessThan)...........................................................41
CMP>(CompareGreaterThan)........................................................41
CMP<=(CompareLessThanorEqualTo)................................................41
CMP>=(CompareGreaterThanorEqualTo).............................................42
ICMP>=(IntervalCompareGreaterThanorEqualTo)......................................46
LC=(LoadCompareEqualTo)..........................................................48
LC<>(LoadCompareUnequalTo)......................................................48
LC<(LoadCompareLessThan).........................................................48
LC>(LoadCompareGreaterThan)......................................................48
LC<=(LoadCompareLessThanorEqualTo).............................................48
LC>=(LoadCompareGreaterThanorEqualTo)..........................................48
CHAPTER5:BinaryArithmeticInstructions
ADD(Addition)......................................................................51
SUB(Subtraction)...................................................................51
MUL(Multiplication).................................................................51
DIV(Division).......................................................................51
INC(Increment)....................................................................513
DEC(Decrement)...................................................................513
ROOT(Root).......................................................................515
SUM(Sum)........................................................................516
RNDM(Random)...................................................................519
TABLEOFCONTENTS
ii FC5AMICROSMARTUSERSMANUAL FC9YB1273
CHAPTER6:BooleanComputationInstructions
ANDW(ANDWord).................................................................61
ORW(ORWord)....................................................................61
XORW(ExclusiveORWord)...........................................................61
CHAPTER7:Shift/RotateInstructions
SFTL(ShiftLeft).....................................................................71
SFTR(ShiftRight)...................................................................73
BCDLS(BCDLeftShift)...............................................................75
WSFT(WordShift)..................................................................77
ROTL(RotateLeft)..................................................................78
ROTR(RotateRight)................................................................710
CHAPTER8:DataConversionInstructions
HTOB(HextoBCD)..................................................................81
BTOH(BCDtoHex)..................................................................83
HTOA(HextoASCII).................................................................85
ATOH(ASCIItoHex).................................................................87
BTOA(BCDtoASCII).................................................................89
ATOB(ASCIItoBCD)................................................................812
ENCO(Encode)....................................................................815
DECO(Decode)....................................................................816
BCNT(BitCount)...................................................................817
ALT(AlternateOutput)..............................................................818
CVDT(ConvertDataType)...........................................................819
DTDV(DataDivide).................................................................821
DTCB(DataCombine)...............................................................822
SWAP(DataSwap).................................................................823
CHAPTER9:WeekProgrammerInstructions
WKTIM(WeekTimer)................................................................91
WKTBL(WeekTable)................................................................92
UsingClockCartridge................................................................95
SettingCalendar/ClockUsingWindLDR.................................................96
SettingCalendar/ClockUsingaUserProgram............................................96
AdjustingClockUsingaUserProgram..................................................97
AdjustingClockCartridgeAccuracy.....................................................98
CHAPTER10:InterfaceInstructions
DISP(Display).....................................................................101
DGRD(DigitalRead)................................................................103
CHAPTER11:ProgramBranchingInstructions
LABEL(Label)......................................................................111
LJMP(LabelJump).................................................................111
LCAL(LabelCall)...................................................................113
LRET(LabelReturn)................................................................113
DJNZ(DecrementJumpNonzero)....................................................115
DI(DisableInterrupt)...............................................................117
EI(EnableInterrupt)................................................................117
IOREF(I/ORefresh).................................................................119
HSCRF(HighspeedCounterRefresh).................................................1111
FRQRF(FrequencyMeasurementRefresh)............................................1112
COMRF(CommunicationRefresh)...................................................1113
TABLEOFCONTENTS
FC5AMICROSMARTUSERSMANUAL FC9YB1273 iii
CHAPTER12:CoordinateConversionInstructions
XYFS(XYFormatSet)................................................................121
CVXTY(ConvertXtoY)..............................................................122
CVYTX(ConvertYtoX)..............................................................123
AVRG(Average)....................................................................127
CHAPTER13:PulseInstructions
PULS1(PulseOutput1)..............................................................132
PULS2(PulseOutput2)..............................................................132
PULS3(PulseOutput3)..............................................................132
PWM1(PulseWidthModulation1)....................................................138
PWM2(PulseWidthModulation2)....................................................138
PWM3(PulseWidthModulation3)....................................................138
RAMP1(RampControl1)..........................................................1314
RAMP2(RampControl2)..........................................................1314
ZRN1(ZeroReturn1).............................................................1326
ZRN2(ZeroReturn2).............................................................1326
ZRN3(ZeroReturn3).............................................................1326
CHAPTER14:PIDInstruction
PID(PIDControl)...................................................................141
ApplicationExamples.............................................................1418
CHAPTER15:Dual/TeachingTimerInstructions
DTML(1secDualTimer)............................................................151
DTIM(100msDualTimer)...........................................................151
DTMH(10msDualTimer)...........................................................151
DTMS(1msDualTimer).............................................................151
TTIM(TeachingTimer)..............................................................153
CHAPTER16:IntelligentModuleAccessInstructions
RUNAREAD(RunAccessRead).......................................................162
RUNAWRITE(RunAccessWrite)......................................................163
STPAREAD(StopAccessRead)........................................................164
STPAWRITE(StopAccessWrite)......................................................165
CHAPTER17:TrigonometricFunctionInstructions
RAD(DegreetoRadian).............................................................171
DEG(RadiantoDegree).............................................................172
SIN(Sine).........................................................................173
COS(Cosine).......................................................................174
TAN(Tangent).....................................................................175
ASIN(ArcSine).....................................................................176
ACOS(ArcCosine)..................................................................177
ATAN(ArcTangent).................................................................178
CHAPTER18:Logarithm/PowerInstructions
LOGE(NaturalLogarithm)............................................................181
LOG10(CommonLogarithm).........................................................182
EXP(Exponent)....................................................................183
POW(Power)......................................................................184
CHAPTER19:FileDataProcessingInstructions
FIFOF(FIFOFormat)................................................................191
TABLEOFCONTENTS
iv FC5AMICROSMARTUSERSMANUAL FC9YB1273
FIEX(FirstInExecute)...............................................................193
FOEX(FirstOutExecute)............................................................193
NDSRC(NDataSearch).............................................................195
CHAPTER20:ClockInstructions
TADD(TimeAddition)...............................................................201
TSUB(TimeSubtraction)............................................................205
HTOS(HMStoSec).................................................................209
STOH(SectoHMS)................................................................2010
HOUR(HourMeter)...............................................................2011
CHAPTER21:ComputerLinkCommunication
ComputerLinkSystemSetup(1:NComputerLinkSystem)................................211
ProgrammingWindLDR.............................................................212
MonitoringPLCStatus..............................................................213
CHAPTER22:ModemMode
SystemSetup......................................................................221
ApplicableModems................................................................222
SpecialInternalRelaysforModemMode..............................................222
SpecialDataRegistersforModemMode...............................................223
OriginateMode....................................................................223
DisconnectMode..................................................................225
ATGeneralCommandMode.........................................................225
AnswerMode.....................................................................226
ModemModeStatusDataRegister...................................................227
InitializationStringCommands.......................................................228
PreparationsforUsingModem.......................................................229
ProgrammingDataRegistersandInternalRelays........................................229
SettingUptheCPUModule..........................................................229
ProgrammingWindLDR............................................................2210
OperatingProcedureforModemMode...............................................2211
SampleProgramforModemOriginateMode..........................................2212
SampleProgramforModemAnswerMode............................................2213
TroubleshootinginModemCommunication...........................................2214
CHAPTER23:ModbusTCPCommunication
ModbusTCPCommunicationGeneralInformation.......................................231
ModbusTCPMasterCommunication..................................................232
ModbusTCPSlaveCommunication...................................................235
ProgrammingtheWebServerModule(FC4ASX5ES1E)...................................238
ModbusTCPCommunicationFormat..................................................239
CHAPTER24:ASInterfaceMasterCommunication
AboutASInterface.................................................................241
OperationBasics...................................................................246
PushbuttonsandLEDIndicators.....................................................2414
ASInterfaceDevices...............................................................2418
UsingTwoASInterfaceMasterModules..............................................2432
UsingWindLDR...................................................................2434
SwitchNetDataI/OPort(ASInterfaceMasterModule1)................................2439
CHAPTER25:ExpansionRS232C/RS485Communication
AllocatingCommunicationPortNumber...............................................251
ComputerLinkCommunication.......................................................252
TABLEOFCONTENTS
FC5AMICROSMARTUSERSMANUAL FC9YB1273 v
OperatorInterfaceCommunication....................................................256
UserCommunication...............................................................259
Troubleshooting.................................................................2513
INDEX
TABLEOFCONTENTS
vi FC5AMICROSMARTUSERSMANUAL FC9YB1273
FC5AMICROSMARTUSERSMANUAL FC9YB1273 11
1:BASICINSTRUCTIONSREFERENCE
Introduction
Thischapterdescribesthelistofbasicinstructionsandbriefdescriptionofeachinstruction.
Fordetailabouteachbasicinstruction,seethecorrespondingpageinFC5AUser'sManualBasicVolume(FC9YB1268).
BasicInstructionList
Symbol Name Function SeePage
AND And SeriesconnectionofNOcontact Basic
Vol.75
ANDLOD AndLoad Seriesconnectionofcircuitblocks Basic
Vol.76
ANDN AndNot SeriesconnectionofNCcontact Basic
Vol.75
BPP BitPop Restorestheresultofbitlogicaloperationwhichwassavedtempo
rarily
Basic
Vol.77
BPS BitPush Savestheresultofbitlogicaloperationtemporarily Basic
Vol.77
BRD BitRead Readstheresultofbitlogicaloperationwhichwassavedtemporarily Basic
Vol.77
CC= CounterComparison(=) Equaltocomparisonofcountercurrentvalue Basic
Vol.719
CCCounterComparison()Greaterthanorequaltocomparisonofcountercurrentvalue Basic
Vol.719
CDP DualPulseReversibleCounter Dualpulsereversiblecounter(0to65,535) Basic
Vol.712
CDPD DoublewordDualPulse
ReversibleCounter Doubleworddualpulsereversiblecounter(0to4,294,967,295) Basic
Vol.716
CNT AddingCounter Addingcounter(0to65,535) Basic
Vol.712
CNTD DoublewordAddingCounter Doublewordaddingcounter(0to4,294,967,295) Basic
Vol.715
CUD Up/DownSelection
ReversibleCounter Up/downselectionreversiblecounter(0to65,535) Basic
Vol.714
CUDD DoublewordUp/Down
SelectionReversibleCounter
Doublewordup/downselectionreversiblecounter
(0to4,294,967,295)
Basic
Vol.717
DC= DataRegisterComparison(=) Equaltocomparisonofdataregistervalue Basic
Vol.721
DCDataRegisterComparison()Greaterthanorequaltocomparisonofdataregistervalue Basic
Vol.721
END End Endsaprogram Basic
Vol.731
JEND JumpEnd Endsajumpinstruction Basic
Vol.730
JMP Jump Jumpsadesignatedprogramarea Basic
Vol.730
LOD Load Storesintermediateresultsandreadscontactstatus Basic
Vol.73
1:BASICINSTRUCTIONSREFERENCE
12FC5AMICROSMARTUSERSMANUAL FC9YB1273
LODN LoadNot Storesintermediateresultsandreadsinvertedcontactstatus Basic
Vol.73
MCR MasterControlReset Endsamastercontrol Basic
Vol.728
MCS MasterControlSet Startsamastercontrol Basic
Vol.728
OR Or ParallelconnectionofNOcontact Basic
Vol.75
ORLOD OrLoad Parallelconnectionofcircuitblocks Basic
Vol.76
ORN OrNot ParallelconnectionofNCcontact Basic
Vol.75
OUT Output Outputstheresultofbitlogicaloperation Basic
Vol.73
OUTN OutputNot Outputstheinvertedresultofbitlogicaloperation Basic
Vol.73
RST Reset Resetsoutput,internalrelay,orshiftregisterbit Basic
Vol.74
SET Set Setsoutput,internalrelay,orshiftregisterbit Basic
Vol.74
SFR ShiftRegister Forwardshiftregister Basic
Vol.723
SFRN ShiftRegisterNot Reverseshiftregister Basic
Vol.723
SOTD SingleOutputDown Fallingedgedifferentiationoutput Basic
Vol.727
SOTU SingleOutputUp Risingedgedifferentiationoutput Basic
Vol.727
TIM 100msTimer Subtracting100mstimer(0to6553.5sec) Basic
Vol.78
TIMO 100msOffdelayTimer Subtracting100msoffdelaytimer(0to6553.5sec) Basic
Vol.711
TMH 10msTimer Subtracting10mstimer(0to655.35sec) Basic
Vol.78
TMHO 10msOffdelayTimer Subtracting10msoffdelaytimer(0to655.35sec) Basic
Vol.711
TML 1secTimer Subtracting1sectimer(0to65535sec) Basic
Vol.78
TMLO 1secOffdelayTimer Subtracting1secoffdelaytimer(0to65535sec) Basic
Vol.711
TMS 1msTimer Subtracting1mstimer(0to65.535sec) Basic
Vol.78
TMSO 1msOffdelayTimer Subtracting1msoffdelaytimer(0to65.535sec) Basic
Vol.711
Symbol Name Function SeePage
FC5AMICROSMARTUSERSMANUAL FC9YB1273 21
2:ADVANCEDINSTRUCTIONS
Introduction
Thischapterdescribesgeneralrulesofusingadvancedinstructions,terms,datatypes,andformatsusedforadvanced
instructions.
AdvancedInstructionList
Group Symbol Name ValidDataType SeePage
WI DL F
NOP NOP NoOperation 210
Move
MOV Move XXXXX 31
MOVN MoveNot XXXX 35
IMOV IndirectMove XXX 36
IMOVN IndirectMoveNot X X 38
BMOV BlockMove X 39
IBMV IndirectBitMove X 310
IBMVN IndirectBitMoveNot X 312
NSET NDataSet XXXXX 313
NRS NDataRepeatSet XXXXX 314
XCHG Exchange X X 315
TCCST Timer/CounterCurrentValueStore X X 316
DataComparison
CMP= CompareEqualTo XXXXX 41
CMP<> CompareUnequalTo XXXXX 4
1
CMP< CompareLessThan XXXXX 41
CMP> CompareGreaterThan XXXXX 41
CMP<= CompareLessThanorEqualTo XXXXX 41
CMP>= CompareGreaterThanorEqualTo XXXXX 42
ICMP>= IntervalCompareGreaterThanor
EqualTo XXXXX 46
LC= LoadCompareEqualTo XXXXX 48
LC<> LoadCompareUnequalTo XXXXX 48
LC< LoadCompareLessThan XXXXX 48
LC> LoadCompareGreaterThan XXXXX 48
LC<= LoadCompareLessThanorEqualTo XXXXX 48
LC>= LoadCompareGreaterThanorEqualToXXXXX 48
BinaryArithmetic
ADD Addition XXXXX 51
SUB Subtraction X X X X X 51
MUL Multiplication X X X X X 51
DIV Division X X X X X 51
INC Increment XXXX 513
DEC Decrement XXXX 513
ROOT Root X X X 515
SUM Sum(ADD) XXXXX 516
Sum(XOR) X
RNDM Random X 519
BooleanComputation
ANDW ANDWord X X 61
ORW ORWord X X 61
XORW ExclusiveORWord X X 61
2:ADVANCEDINSTRUCTIONS
22FC5AMICROSMARTUSERSMANUAL FC9YB1273
ShiftandRotate
SFTL ShiftLeft 71
SFTR ShiftRight 73
BCDLS BCDLeftShift X 75
WSFT WordShift X 77
ROTL RotateLeft X X 78
ROTR RotateRight X X 710
DataConversion
HTOB HextoBCD X X 81
BTOH BCDtoHex X X 83
HTOA HextoASCII X 85
ATOH ASCIItoHex X 87
BTOA BCDtoASCII X X 89
ATOB ASCIItoBCD X X 812
ENCO Encode 815
DECO Decode 816
BCNT BitCount 817
ALT AlternateOutput 818
CVDT ConvertDataType XXXXX 819
DTDV DataDivide X 821
DTCB DataCombine X 822
SWAP DataSwap X X 823
WeekProgrammer WKTIM WeekTimer 91
WKTBL WeekTable 92
Interface DISP Display 101
DGRD DigitalRead 103
UserCommunication
TXD1 Transmit1BasicVol.106
TXD2 Transmit2BasicVol.106
TXD3 Transmit3BasicVol.106
TXD4 Transmit4BasicVol.106
TXD5 Transmit5BasicVol.106
TXD6 Transmit6BasicVol.106
TXD7 Transmit7Basic
Vol.106
RXD1 Receive1BasicVol.1015
RXD2 Receive2BasicVol.1015
RXD3 Receive3BasicVol.1015
RXD4 Receive4BasicVol.1015
RXD5 Receive5BasicVol.1015
RXD6 Receive6BasicVol.1015
RXD7 Receive7BasicVol.1015
ProgramBranching
LABEL Label 111
LJMP LabelJump 111
LCAL LabelCall 113
LRET LabelReturn 113
DJNZ DecrementJumpNonzero 115
DI DisableInterrupt 117
EI EnableInterrupt 117
IOREF I/ORefresh 119
HSCRF HighspeedCounterRefresh 1111
FRQRF FrequencyMeasurementRefresh 1112
COMRF CommunicationRefresh 1113
Group Symbol Name ValidDataType SeePage
WI DL F
2:ADVANCEDINSTRUCTIONS
FC5AMICROSMARTUSERSMANUAL FC9YB1273 23
CoordinateConversion
XYFS XYFormatSet X X 121
CVXTY ConvertXtoYXX122
CVYTX ConvertYtoXXX123
AVRG Average XXXXX 127
Pulse
PULS1 PulseOutput1132
PULS2 PulseOutput2132
PULS3 PulseOutput3132
PWM1 PulseWidthModulation1138
PWM2 PulseWidthModulation2138
PWM3 PulseWidthModulation3138
RAMP1 RampPulseOutput11314
RAMP2 RampPulseOutput21314
ZRN1 ZeroReturn11326
ZRN2 ZeroReturn21326
ZRN3 ZeroReturn31326
PIDInstruction PID PIDControl X X 141
Dual/TeachingTimer
DTML 1secDualTimer 151
DTIM 100msDualTimer 151
DTMH 10msDualTimer 151
DTMS 1msDualTimer 151
TTIM TeachingTimer 153
IntelligentModuleAccess RUNA RunAccess X X 162
STPA StopAccess X X 164
TrigonometricFunction
RAD DegreetoRadian X 171
DEG RadiantoDegree X 172
SIN Sine X 173
COS Cosine X 174
TAN Tangent X 175
ASIN ArcSine X 176
ACOS ArcCosine X 177
ATAN ArcTangent X 178
Logarithm/Power
LOGE NaturalLogarithm X 181
LOG10 CommonLogarithm X 182
EXP Exponent X 183
POW Power X 184
FileDataProcessing
FIFOF FIFOFormat X 191
FIEX FirstInExecute X 193
FOEX FirstOutExecute X 193
NDSRC NDataSearch XXXXX 195
Clock
TADD TimeAddition 201
TSUB TimeSubtraction 205
HTOS HMStoSec 209
STOH SectoHMS 2010
HOUR HourMeter 2011
EthernetInstructions
EMAIL SendEmail
PING Ping
ETXD TransmitoverEthernet
ERXD ReceiveoverEthernet
Group Symbol Name ValidDataType SeePage
WI DL F
2:ADVANCEDINSTRUCTIONS
24FC5AMICROSMARTUSERSMANUAL FC9YB1273
AdvancedInstructionApplicableCPUModules
ApplicableadvancedinstructionsdependonthetypeofCPUmodulesaslistedinthetablebelow.
Group Symbol
AllinOneTypeCPUModules SlimTypeCPUModules
FC5AC10R2
FC5AC10R2C
FC5AC10R2D
FC5AC16R2
FC5AC16R2C
FC5AC16R2D
FC5AC24R2
FC5AC24R2C
FC5AC24R2D
FC5AD16RK1
FC5AD16RS1
FC5AD32K3
FC5AD32S3
FC5AD12K1E
FC5AD12S1E
NOP NOPXXXXX
Move
MOVXXXXX
MOVNXXXXX
IMOVXXXXX
IMOVNXXXXX
BMOVXXXXX
IBMVXXXXX
IBMVNXXXXX
NSETXXXXX
NRSXXXXX
XCHGXXXXX
TCCSTXXXXX
DataComparison
CMP=XXXXX
CMP<>XXXXX
CMP<XXXXX
CMP>XXXXX
CMP<=XXXXX
CMP>=XXXXX
ICMP>=XXXXX
LC= XXXXX
LC<>XXXXX
LC< XXXXX
LC> XXXXX
LC<=XXXXX
LC>=XXXXX
BinaryArithmetic
ADDXXXXX
SUBXXXXX
MULXXXXX
DIV XXXXX
INC XXXXX
DECXXXXX
ROOTXXXXX
SUMXXXXX
RNDMXXXXX
Boolean
Computation
ANDWXXXXX
ORWXXXXX
XORWXXXXX
ShiftandRotate
SFTLXXXXX
SFTRXXXXX
BCDLSXXXXX
WSFTXXXXX
ROTLXXXXX
ROTRXXXXX
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133
  • Page 134 134
  • Page 135 135
  • Page 136 136
  • Page 137 137
  • Page 138 138
  • Page 139 139
  • Page 140 140
  • Page 141 141
  • Page 142 142
  • Page 143 143
  • Page 144 144
  • Page 145 145
  • Page 146 146
  • Page 147 147
  • Page 148 148
  • Page 149 149
  • Page 150 150
  • Page 151 151
  • Page 152 152
  • Page 153 153
  • Page 154 154
  • Page 155 155
  • Page 156 156
  • Page 157 157
  • Page 158 158
  • Page 159 159
  • Page 160 160
  • Page 161 161
  • Page 162 162
  • Page 163 163
  • Page 164 164
  • Page 165 165
  • Page 166 166
  • Page 167 167
  • Page 168 168
  • Page 169 169
  • Page 170 170
  • Page 171 171
  • Page 172 172
  • Page 173 173
  • Page 174 174
  • Page 175 175
  • Page 176 176
  • Page 177 177
  • Page 178 178
  • Page 179 179
  • Page 180 180
  • Page 181 181
  • Page 182 182
  • Page 183 183
  • Page 184 184
  • Page 185 185
  • Page 186 186
  • Page 187 187
  • Page 188 188
  • Page 189 189
  • Page 190 190
  • Page 191 191
  • Page 192 192
  • Page 193 193
  • Page 194 194
  • Page 195 195
  • Page 196 196
  • Page 197 197
  • Page 198 198
  • Page 199 199
  • Page 200 200
  • Page 201 201
  • Page 202 202
  • Page 203 203
  • Page 204 204
  • Page 205 205
  • Page 206 206
  • Page 207 207
  • Page 208 208
  • Page 209 209
  • Page 210 210
  • Page 211 211
  • Page 212 212
  • Page 213 213
  • Page 214 214
  • Page 215 215
  • Page 216 216
  • Page 217 217
  • Page 218 218
  • Page 219 219
  • Page 220 220
  • Page 221 221
  • Page 222 222
  • Page 223 223
  • Page 224 224
  • Page 225 225
  • Page 226 226
  • Page 227 227
  • Page 228 228
  • Page 229 229
  • Page 230 230
  • Page 231 231
  • Page 232 232
  • Page 233 233
  • Page 234 234
  • Page 235 235
  • Page 236 236
  • Page 237 237
  • Page 238 238
  • Page 239 239
  • Page 240 240
  • Page 241 241
  • Page 242 242
  • Page 243 243
  • Page 244 244
  • Page 245 245
  • Page 246 246
  • Page 247 247
  • Page 248 248
  • Page 249 249
  • Page 250 250
  • Page 251 251
  • Page 252 252
  • Page 253 253
  • Page 254 254
  • Page 255 255
  • Page 256 256
  • Page 257 257
  • Page 258 258
  • Page 259 259
  • Page 260 260
  • Page 261 261
  • Page 262 262
  • Page 263 263
  • Page 264 264
  • Page 265 265
  • Page 266 266
  • Page 267 267
  • Page 268 268
  • Page 269 269
  • Page 270 270
  • Page 271 271
  • Page 272 272
  • Page 273 273
  • Page 274 274
  • Page 275 275
  • Page 276 276
  • Page 277 277
  • Page 278 278
  • Page 279 279
  • Page 280 280
  • Page 281 281
  • Page 282 282
  • Page 283 283
  • Page 284 284
  • Page 285 285
  • Page 286 286
  • Page 287 287
  • Page 288 288
  • Page 289 289
  • Page 290 290
  • Page 291 291
  • Page 292 292
  • Page 293 293
  • Page 294 294
  • Page 295 295
  • Page 296 296
  • Page 297 297
  • Page 298 298
  • Page 299 299
  • Page 300 300
  • Page 301 301
  • Page 302 302
  • Page 303 303
  • Page 304 304
  • Page 305 305
  • Page 306 306
  • Page 307 307
  • Page 308 308
  • Page 309 309
  • Page 310 310
  • Page 311 311
  • Page 312 312
  • Page 313 313
  • Page 314 314
  • Page 315 315
  • Page 316 316
  • Page 317 317
  • Page 318 318
  • Page 319 319
  • Page 320 320
  • Page 321 321
  • Page 322 322
  • Page 323 323
  • Page 324 324
  • Page 325 325
  • Page 326 326
  • Page 327 327
  • Page 328 328
  • Page 329 329
  • Page 330 330
  • Page 331 331
  • Page 332 332
  • Page 333 333
  • Page 334 334
  • Page 335 335
  • Page 336 336
  • Page 337 337
  • Page 338 338
  • Page 339 339
  • Page 340 340
  • Page 341 341
  • Page 342 342
  • Page 343 343

IDEC FC5A User manual

Type
User manual

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI