With ModCom, learning how to set up complex run-time applications can be fairly easy once the user becomes familiar with the basic functions and features of the software. Below is a brief guide which will try to address some of the more common questions that sometimes arise from first time users.
The first time ModCom is opened, a demo application will automatically load and begin running. This demo will demonstrate some of the capabilities of the various Screen Objects supported by ModCom. To exit out of the demo routine, click on the red "Halt" button at the top of the screen which will stop the main run-loop and put the project in edit mode. At this point, the user can load another application from file, or create a new application from scratch.
In addition to the main demo application, ModCom also includes a collection of sample applications which have been setup specifically for each one of the DAQ Modules that will show some of the basic operations of ModCom. To experiment with these, go to the <File> menu item at the top of the screen, click on "Open", and look for the "Samples" folder in the directory in which you installed ModCom. If you chose the default directory when installing ModCom, it will be "C:\Program Files\Weeder Technologies". After opening one of these files, click on the green "Run" button at the top of the screen to begin executing the main run-loop of the application.
Note, each time that ModCom is started, it will automatically load the last application file that was used, whether it is one of the sample applications, or an application created by the user.
Sending Commands to the DAQ Modules:
Each of the DAQ Modules has its own unique command set which is used to control its operation and to pass data back and forth between it and the host PC. The command set is shown in Table 2 of the product's data sheet which can be found in your computer's START menu. A typical command to read data from a module will look like this:
The 1st character "A" is the header character which is determined by the DIP switch setting on the DAQ Module circuit card. If using multiple cards plugged together, make sure each card is set to a different header character. The 2nd character "R" is the command title character which in this case is the READ command. The 3rd character "B" is the channel number character which could be A, B, C, or D and determines which of the four channels the data should be read from. All commands should be terminated with a carriage return, however ModCom automatically inserts the carriage return at the end of each command when it's being transmitted.
The various objects in ModCom use these commands to interact with the modules so it is important for the user to become familiar with the command set of each of the DAQ Modules being used in the application. Pull up the Send/Receive dialog box which is located in the <Communicate> menu at the top of the screen. This box can be used to type in the commands from Table 2, transmit them directly to the DAQ Modules, and see the response coming back. Use this for testing, experimenting, and to get a feel for the operation of each DAQ Module before moving on and setting up a custom application.
Creating a New Project:
To create a new application project, go to the <File> menu item at the top of the screen and click on "New" which will clear the screen of any existing items. From this point various Screen Objects can be selected from the <Place-Object> menu and moved to any desired locations across the screen. Each of these Screen Objects differ in function and appearance, some are used to continuously poll the DAQ Modules and show the return data on the screen, other Screen Objects are used to send commands to a DAQ Module in response to mouse activity, and others are used to display some form of status or information. To setup or edit the properties of any of these Screen Objects, right click on it with the mouse. Refer to the Screen Object in these help files to get more information about it and to learn how to use it in an application. Once there are objects on the screen ready to operate, click on the green "Run" button at the top of the screen to begin the execution.
Behind the Scenes:
In addition to the objects placed on the screen, ModCom incorporates a number of other functions which operate behind the scenes. The most important being Scripts and Conditionals which are found in the <Run-Loop> menu. A Script is a user-defined operation which can be called from other objects in ModCom. It is composed of a list of one or more functions which will execute sequentially, and can be set up to run in a continuous loop if desired. A Conditional is a logical expression typed in by the user which can watch for certain conditions during run-time and act upon them if and when they occur. Another useful tool in the <Run-Loop> menu is the Data Logging function which can be set up to automatically take the data from the Screen Objects and write it to file at specific time intervals. The data from this file can then be imported into an external spreadsheet program such as Excel or uploaded to a web page automatically using the Web Logging function.
In many cases there may be a need to set up the DAQ Modules prior to executing the main run-loop of the application. The Digital Input modules, for instance, will need to be configured before they will respond to switch or button closures. Go to the <Run-Loop> menu and click on Initialization. Use this dialog box to enter in commands which should be transmitted to the DAQ Modules prior to running the application. In this box you can also choose a Script that will start automatically, and whether or not the application should begin executing as soon as it is opened or wait for the user to click on the "Run" button.