Download 2711E-6.14, PanelBuilder 1400e Software for Windows User Manual
Transcript
7–18 Creating Expressions IF ( state = 0 ) THEN result = 0 EXIT END IF ’The motor is not running ’ The conditional expression wraps to the next line. ’ Note the use of the line continuation character ( _ ). IF (((state AND 4) <> 0) AND NOT ((state AND 251) _ <> 0)) THEN result = 1 EXIT ’The motor is running END IF IF (((state AND 4) <> 0) AND ((state AND 8) <> 0) AND NOT ((state AND 243) <> 0)) THEN result = 2 _ ’The motor is starting, since ’run and low speed are active EXIT END IF IF ((state AND 243) <> 0) THEN result = 3 ’The motor has an alarm EXIT END IF The numbers used are based on converting the binary representation of the state bits into a decimal number. For instance, when bit 2 is set, this is equivalent to the number 4; when bit 3 is set, this is equivalent to the number 8; 243 represents all alarm bits set. Expression Return Values It is important to understand how an expression is evaluated in order to correctly determine the result of the expression. An expression will return the value of its last-executed statement. Publication 2711E-6.14 – November 1998
Related documents
2711E-819, PanelBuilder 1400e Software for Windows User Manual
2711E-6.17, PanelView 1000e/1200e/1400e User Manual
2711E-818, PanelBuilder 1400e Software for Windows Getting Started
2711E-6.16, PanelView e Transfer Utility User Manual
2711E-821, PanelView 1000e/1200e/1400e User Manual
2711E-UM003B-EN-P, PanelView e Transfer Utility User Manual
FactoryTalk View Machine Edition User`s Guide
FactoryTalk® View Machine Edition User`s Guide
PanelViewt 1200/1400e Transfer Utility
Introduction to the PanelView 1200 Transfer Utility
2711E-6.15, PanelBuilder 1400e Configuration