This section is NOT AN ACTION, and shows how to reference different kinds of I/O values inside actions. These values can be used to replace numbers and set variables for actions.

Note: when a conditional below uses a # in it, it represents whatever channel number you wish to grab that value from.

Internal I/O

din[#].state == 1
rout[#].state == 1

Temperature and Environmental I/O

temp[#].f >= 75 or temp[#].fahrenheit >= 75
temp[#].c >= 20 or temp[#].celsius >= 20
env[#].f >= 75 or env[#].fahrenheit >= 75
env[#].c >= 20 or env[#].celsius >= 20
env[#].humidity >= 80

Validate Days of the Week

date.isDay(montuewedthufri)
date.isDay(satsun)

Validate Time of Day

time.before(HH:MM)
time.after(HH:MM)

4-20ma I/O

iin[#].scaled == 1
iout[#].scaled == 1

10volt I/O

ain[#].scaled == 1
aout[#].scaled == 1

Examples

Internal I/O

Using din[#].state == 1 and rout[#].state == 1 are for referencing if inputs and outputs of the JNIOR I/O are high or low. (1 being High, 0 being low) The example above shows an if block action checking if din[1].state == 1, which means the if block won't run unless Input 1 is High, and if it is, then pulse output 1 for 5 seconds.

Temperature and Enviromental I/O

Using the temperature and humidity taken from the environmental sensor, you can perform action based on those values. The example above shows a while block, and with a environmental sensor module hooked up to the JNIOR, you can have a task that will run a loop that logs the temperature until the temperature of the room drops to a certain number.

Validate Days of the Week

When performing actions, you can reference the day of the week to control when certain actions will perform. The example above shows two if statements, one setting output 1 to high if its Monday - Friday, and another setting output 2 to high if its Saturday or Sunday.

Validate Time of Day

When performing actions, you can reference the time of day to control certain actions as well. The example above shows an if/else statement, setting output 1 to high if its before 12:00 noon, or setting output 1 to low if its after 12:00 noon. The time is based on 24 hours, so 11:59pm is 23:59.

4-20 and 10volt I/O

The 10volt and 4-20ma expansion modules I/O can be used to control actions based off their values. The example above shows that if the 4-20ma output is greater then 10 then it sets itself back to 4, and if the 10volt goes above 5, then its sets itself to zero.