First ensure that the gateway has the digital outputs enabled in the toolkit.
Then, you need to set up two new raw variables and name them DO1 and DO2 in the relevant device on the platform.
The easiest way to control and test the digital outputs is by a switch widget on a dashboard. Set it up so that it references the DO1 and/or DO2 variables. Then, when it is switched (by clicking on the widget), the state of the digital outputs will change.
Another way to control the digital outputs is by using events. You can set up an event that triggers when another variable is at a certain level (or several other options.) For the action, choose set variable and choose the DO1 or 2 as needed. Active trigger should be {"value":1} and back to normal should be {"value":0} (if you want a return to normal trigger)