Click on the Connections Tab
Under the Module Setup pane, Select Digital Output
Click the Auto Create box.
By clicking auto create, you are creating a variable within PowerVision for the Digital Output. It should
have generated a variable name similar to: IO.Digital Output and is located in the Input Output Port Manager folder in the Programming Tab.
Now we need to create 2 User Events that will turn the Digital Output on and off.
User Event for Digital Output Off
In the Programming Tab, Select the Input Output Port Manager folder (by having this folder selected, whatever new programming item that is created will be put in this folder)
Now click the + in the Programming Items pane
Select New User Event
Change the name to: UE DigOut Off
In the Actions Tab, click the +
Select Input Output Port Manager (IO) > Digital Output Low > Digital Output
User Event for Digital Output On
Now click the + in the Programming Items pane
Select New User Event
Change the name to: UE DigOut On
In the Actions Tab, click the +
Select Input Output Port Manager (IO) > Digital Output High > Digital Output
Now let's create a Text Gauge and assign a button press to test the Digital Output.
Click on the Page Designer Tab
Select the I/O Animations page that you created above
From the Toolbox, drag a Text Gauge onto the design canvas
Name this Text Gauge: TG DigOut
In the Text Gauge Properties pane, assign it to the variable you created for the
Digital Output above (i.e. IO.Digital Output)
Using Supplemental 4.2.1, change the Text Gauge Properties
Supplemental 4.2.1
Now let’s fire the two User Events we created. There are many ways to fire events within PowerVision; for this example we will fire these events by Editing the Key Behaviors.
Select the upper right and the Edit Key Behavior - Key 2 window will appear
For Key Down, Select Fire Event and choose, UE DigOut On
For Key Up, Select Fire Event and choose, UE DigOut Off
Create and Load your configuration to test.
When you press and hold Key 2 on the display you should see:
• the Digital Output variable display a 1
• the light should be on
When Key 2 is released on the display you should see:
• the Digital Output variable display a 0
• the light should be off
To build upon this example, let’s have the digital output fire when we have Engine Overspeed.
First, let’s assign conditions to the 2 User Events that we just created (1) for the engine’s accepted operating range and (2) for the engine’s overspeed range.
Assign a condition for DigOut Off
Click on the Programming Tab
Select and expand the Input Output Port Manager folder
Select the User Event: UE DigOut Off
Select the Conditions Tab and click the + (take note of the name, we will be selecting this in upcoming steps)
With the Variables Tab selected, start typing in speed (the list should filter automatically)
Double Click on: J1939_Engine_Engine_Speed
Complete the expression as follows: J1939_Engine_Engine_Speed<=3000
Click OK
Assign a condition for DigOut On
Select and expand the Input Output Port Manager folder
Select the User Event: UE DigOut On
Select the Conditions Tab and click the + (take note of the name, we will be selecting this in upcoming steps)
With the Variables Tab selected, start typing in speed (the list should filter automatically)
Double Click on: J1939_Engine_Engine_Speed
Complete the expression as follows: J1939_Engine_Engine_Speed>3000
Click OK
Now we need to create an event that will continually check the engine’s speed and fire the appropriate events we just created if the conditions are met.
Create a User Event to check Engine Speed
Select and expand the Input Output Port Manager folder
Click the + and select New User Event
Change the name to: UE RPM Check
With the Actions Tab selected, click the +
Select Central Control Module (CCM) > Fire Event > UE DigOut Off Condition
With the Actions Tab still selected, click the +
Select Central Control Module (CCM) > Fire Event > UE DigOut On Condition
Now we need to set a timer that regulates how often this event checks these conditions.
With the UE RPM Check event still selected
Click the Timers Tab and click the +
Click on the new timer and change the name to: TM RPM Check
Make this a recurring timer with a 250 ms duration
Because this is a recurring timer, it will automatically start on startup. If this was a one shot timer, we would need to program the timer to start.
Now let’s create an RPM gauge, a Smart Text Widget and a button press to fire the Calculate
Toggle SimData Event we created so that we can test what we have done.
Click on the Page Designer Tab
Select the I/O Animations page that you created above
From the Toolbox, drag a Text Gauge onto the design canvas
Name this Text Gauge: TG RPM
Using Supplemental 4.2.2, change the Text Gauge Properties
From the Toolbox, drag a Smart Text Widget onto the design canvas
Name this Smart Text Widget: STW Engine Status
Using Supplemental 4.2.3, change the Smart Text Widget Properties
Supplemental 4.2.2
Supplemental 4.2.3
For the STW Engine Status Widget, Under Advanced Features > Smart Text Items
Click Edit Smart Labels…
The Smart Text Editor window will appear.
For the Selector Variable, choose IO.Digital Output (this is the variable we created for the digital output in the previous steps)
Click the +
Under Description change Enumeration0 to: Engine Speed Normal
Under DisplayValue change Enumeration0 to: NORMAL
Click the + again
Under Description change Enumeration1 to: Engine Overspeed
Under DisplayValue change Enumeration1 to: OVERSPEED
Click OK
Now, select the lower right and the Edit Key Behavior - Key 10 window will appear
For Key Down, Select Fire Event and choose CE Toggle SimData
For Key 2, Assign Key Down and Key Up behaviors to Not Mapped
Create and Load your configuration to test.
When you press the bottom right key (Key 10) you should see:
• the RPM gauge simulating data
• when Engine Speed goes above 3000 RPMs the light should be on
• when Engine Speed goes below or is equal to 3000 RPMs the light should be off