

These two loops are made to set the value of the sbMinutes and swHours variables keeping two different inputs activated, the ifSetUpMin and ifSetUpHours inputs. Reach 167, remaining within the range, being the hours in a week. A byte type variable is used for the seconds and minutes since they never leave the range, while the swHours variable uses a Word type variable since it can This creates a system clock with three system variables: one for seconds, one for minutes and one for hours. SwHours = 0 reset the hours, because a week has passed. SwHours = swHours + 1 increase the hoursĮLSE else (if the hours is greater than 167) IF swHours LT 167 If the swHours variable is less than 167 SbMinutes = sbMinutes + 1 increase the minutes counterĮLSE else (if the minutes are greater than 59) IF sbMinutes LT 59 If the sbMinutes variable is less than 59 SbSeconds = sbSeconds + 1 increase the seconds counterĮLSE else (if the seconds are greater than 59) IF sbSeconds LT 59 If the sbSeconds variable is less than 59 What's more the ELSE set is optional.Ĭount = count + 1 increase by 1 the variable count An instruction set can be made up of a group of instructions or even a single instruction. boolean value 1, instruction set 1 is executed otherwise instruction set 2 is executed. This card has 32 digital input, 32 digital output, 6 analog output, etc.Ī typical conditional, so if the condition is true, i.e. The keywords are provided in the hardware installation and maintenance manuals.ġ 1P51F 30 QMOVE J1-P51F with firmware 30ģ 1MG8F. Each card is identified by a keyword that identifies the type of hardware. Slot 1 indicates which CPU is being used, while the other slots declare the electronic cards installed in the model. The declaration made in the BUS section is divided in slots.
#Qview aplication serial#
The QMOVE may also have other resources like serial interfaces or removable mass storage slots. the number of digital inputs and outputs, analog inputs and outputs, or count inputs. In accordance with the declared hardware model it is also possible to obtain its hardware resources, e.g. The BUS section in the configuration unit is essential to declare the QMOVE hardware model being used.

We can imagine the memory structure of a variable DATAGROUP, in our example with static and indexed variables, as the following table:
#Qview aplication code#
To refer to variable Variable4 in recipe 5 to step 9, the used code is: Indexed variables are to be considered as containers of a list of values for each recipe, and are accessed as a 2-dimensional array, where the first value is the number of the recipe, the second the number of desired step. The first value of this sector is a number or an integer constant, and represents the number of steps for each recipe in archive. Their function is to introduce for each recipe, the concept of step. Indexed variables reside in DATAGROUP subsector named STEP. OwOutput B 3.OUTW A word of 16 digital output grouped in a word (1-16). ObOutput2 B 3.OUTB2 Second 8 digital output grouped in a byte 8 (9-16). ObOutput1 B 3.OUTB1 First 8 digital output grouped in a byte 8 (1-8). IwInput W 3.INPW A word of 16 digital input grouped in a word (1-16). IbInput2 B 3.INPB2 Second 8 digital input grouped in a byte (9-16). IbInput1 B 3.INPB1 First 8 digital input grouped in a byte (1-8). If the card has more than eight digital inputs or outputs ObOutput B 3.OUTB 8 digital output grouped in a single byte IbInput B 3.INPB 8 digital input grouped in a single byte OUTPUT This identifier is similar to an eight or sixteen bit variable where each input or output represents a bit. name: the reference name of I/O's physical address (defined in hardware references).Īn interesting application of the digital inputs and outputs is to group them in under a single identifier. INPUT or OUTPUT address comprising: Slot number.name: Slot number is the number of the slot with the card containing the hardware resource. the symbol associated to the input or output GlRemainTime = tMyTimer.remain 3.10 INPUT and OUTPUT variables It is also possible to read the remaining time value before the timer ends (the read value is expressed in milliseconds): IF(tMyTimer) If timer tMyTimer has passed exec the code GfIsTimerEnd = tMyTimer Assign to gfIsTimerEnd variable the timer state. When a timer variable is placed on the right of the assignment operator or in an expression only the status is read (0 = Timing in course, 1 = Timing ended):

TMyTimer = 1000 Set timer tMyTimer to 1 second. When a timer variable is placed on the left of the assignment operator a value is set in the timer (in milliseconds): Optional comment recommended for better comprehension of the software.
