Chapter 7, Run the project in the RTCU Emulator |
Top Previous Next |
Now you have developed the Greenhouse project and are probably wondering whether it works or not. Well, this is the right chapter for you. In this chapter, we will test the program, and the RTCU Emulator will save you time, as you will not have to fix errors after you have transferred your program to an RTCU device. In the emulator, the "transfer time" is reduced to sub-seconds, and you have all the different hardware resources available on your screen, which greatly simplifies the process of testing your program - a process that would involve switches, wires and the like in the real world.
So, click on the "Launch" menu item:
This will launch the RTCU Emulator and bring up the main window:
The first time the RTCU Emulator is launched there is no virtual devices present and the first device must therefore be created.
Click on the 'Devices...' menu item to bring up the Devices dialog:
The first time the dialog is opened, there are no devices defined and the list will be empty.
So click on the 'New' button to create a device:
Click on the Family drop down and select the 'AX9' option, then click on the 'OK' button.
The Device dialogue will now list the device:
Select the newly created device and click on the 'Load' button.
The main window of the RTCU Emulator will now look like this:
With the main window, you can now enable the different control windows you want to use for testing purposes. Click on the "IO" to enable the I/O control window, and then click on the "GSM" to enable the GSM control window.
You now see these two windows:
Please note that the names of the four Digital I/O signals we have defined are shown in the IO control window. This makes it easier to identify which I/O signal is assigned to which variable in the program.
Now we can load and execute our program by pressing the "Load & Run" button on the main window. Now your program is actually running!
If you click on the arrow button at the "Sensor_L" digital input, you will see that the digital output "Out_Heater" will turn on. And when you turn off the "Sensor_L" digital input, the "Out_Heater" will also be deactivated. The same applies to input "Sensor_H" and output "Out_Ventilation".
So, when you activate the "Sensor_L" button, the IO control window will look like this:
Try to leave the "Sensor_L" input on for more than two minutes and see if you can guess what will happen.
If you guessed the following, you are right! The GSM control window will look like this once two minutes have elapsed:
You received an SMS message, because the "Sensor_L" was active for more than two minutes!
It is now up to you to figure out what will happen if the "Sensor_H" input is active for more than 2 minutes...
This was a simple session about using the RTCU Emulator. There are many more aspects to cover, but these are covered in the online help system.
This was merely emulation. However, if you have an RTCU device, you can now proceed to:
Chapter 8 Transfer the project to a RTCU device
This is a good place to take a break from the tutorial and come back later.
Should you encounter any difficulties during this tutorial, please contact support. |