A sequence is an ordered list of procedural commands which Dewesoft will execute one after another. It contains building blocks (also called elements). A sequence can be defined as a function whose domain is a countable totally ordered set, such as the natural numbers.
A sequence is an ordered list of procedural commands which Dewesoft X will execute one after another. It contains building blocks (also called elements).
The order of elements is important since the execution flow starts at the first block marked with a grey dot and follows the path defined by the arrow lines. Same elements can appear multiple times at different positions in the sequence.
Most precisely, a sequence can be defined as a function whose domain is a countable totally ordered set, such as the natural numbers. Clear? No? That is from the doctoral thesis on the sequencer made by one of our main programers. Even if it sounds complicated, the sequencer is really easy to use. Let me show you how.
If we take a look at the main screen in the Dewesoft X sequencer, we can see three main tabs: Sequence, Test Cases and Settings.
Let's start with Sequence.
If we take a look at the sequence tab screen, we can see different buttons.
Under File section, we can create a new sequence or save an existing one.
Under Diagram section, we can press Main button that brings us to the main screen, or Event button that opens a new Event block section. Custom buttons enable us to import our block or to create a new one by pressing + button.
We also have Debug section where we can find two buttons. Play for playing our created sequence and Debug.
In the end, we have a Close section that enables us to close Dewesoft X sequencer.
On the left side of the screen, we can find different Blocks. Blocks are separated into 4 main categories: Action Blocks, Decision Blocks, Wait Blocks and Others. Each of this blocks performs different actions, decisions,...that we can use when creating a sequence.
All of this blocks can be simply pulled into the Main sequence screen.
We can connect them by dragging the first block over the next one in the sequence or by dragging the second block in the sequence over the first one.
Let’s grab the Wait for user block and pull it over the Load setup block.
There will be a black line shown in the bottom of the Load setup block indicating that those two will be connected.
Release the mouse button to connect the two blocks.The correct connection will be shown as an arrow pointing from the first to the second block.
As an alternative, you can also select the block from which you would like to connect. The connection arrows will be shown. When we move the mouse over the connection point, the mouse cursor will change as indicated on the picture below.
When we now press and hold the mouse button, the connection line will be shown. If we move over the module, the module will turn to orange color.
If we release the mouse button at this moment, the connection arrow will be drawn.
If we made a mistake either by adding the module or adding a connection line, any element can be deleted by right-clicking on the element and choosing Delete.
Now, that we have connected the modules together, let’s set the properties of the building blocks.
First we choose the block that we want to set up and then define its properties on the right side of the sequencer screen. The block that we chose turns yellow.
In the upper section of Text Info we define the name of the block that will appear while running the sequence in Dewesoft X. The name of the block is a command, which the user needs to perform while measuring.
Next we can choose the Output Voice option.
This option will speak out the Text Info through Windows Text-To-Speech option.
In Windows OS you can define the human voices which allow disabled people to operate the system. In our case there are several applications where the user can’t really look at the screen while performing the test and for that purpose this option can be really helpful.
Setup file section depends on the block. For Load Setup block we can define the setup file which will be loaded. In our case we have prepared up front a simple setup called FirstTry. By clicking on the three dots push button we can choose which setup to load. The name of the setup will also be noted on the Load Setup block.
At this point we can also explain the meaning of Dynamic and Static links. If we choose the Dynamic link, it means that our sequence will be saved separately from the setup in Dewesoft X. In case we choose the Static link, we will save the setup together with our sequence, so we don't have to be so careful while moving our measurement to a different computer, because there is only one file to move.
Then we select the Wait for user block. We can wait for user interaction, trigger or certain value of the selected channel. At this point, the only thing needed is to inform the user what to do. That can be entered in the Text info field.
The action button needs a selection of a Dewesoft X event. There are many actions that can be performed with this block, but let’s start with a simple one, the Start action.
This time let’s not drag it into the empty space, but over the Start block. The black line will appear on the bottom of the Start block and when releasing the mouse button, a new action module will be added and automatically connected to the Start block.
Let’s choose the Start storing action. Next we can continue by adding a Delay block from the left side. This block will wait with the execution of the sequence for the specific time period. Let’s add a few more Actions: Stop and Analyse by adding the Action block and selecting an appropriate action from the list.
Now let’s do something more interesting - let’s make a decision. The decision can be made either by the user or from the formula. In this example I would like to ask the user if another measurement should be performed. So I enter this text in the Text info field.
Now let’s connect the blocks.
If the answer is No, then the sequence can be stopped and therefore no connection line is needed.
If the answer is Yes, I have to draw a line to some point above to repeat the execution.
But we should remember that we are in Analyse mode. Therefore I add another Action called Measure to go back to measure mode.
Then I can connect the If by clicking on the green tick and drag it to the Measure action.
The correct connection will be shown after releasing the mouse button.
Then I need to come back to the previous flow. The right place would be the Start block.
Therefore, I need to connect the Measure to the Start block.
Don’t forget, any mistake can be corrected by right clicking on the connection line and choosing Delete or by left clicking on the connection line and pressing Delete button on the keyboard.
OK, enough “programming”, let’s see what we have done. Let’s save the sequence by pressing Save.
Now let’s try to run it by pressing the Play button. In real life, the sequence can be run just by loading it from the start up screen, but for testing purposes Play and Debug buttons are close at hand.
The sequence will load the setup and show the top bar. There are several actions which the user can perform: Pause the sequence, Stop the sequence or Skip one block of the sequence. These buttons are always available.
Based on the chosen block the additional buttons will be shown. At the wait block, we could see the text info we have entered and the button Continue.
This allows the user to enter some parameters, prepare the measurements and so on.
In this case, Continue button will start the measurement. The delay will store the data for five seconds and the user will need to wait for that time period:
After five seconds, the stored file will be reloaded and the question will come to the user if another measurement should be taken.
If we say Yes, another data file will be stored.
If we say No, the execution will stop and the software will go to startup screen or to the sequence editor.
Let’s try to eliminate the user’s ability to interfere with the flow execution and, on the other hand, let’s give him a chance to enter important information about the measurement conditions.
If we have left the sequence editor, the editor can be reopened from the start up the screen by choosing the right sequence and pressing Edit sequence button.
Now let’s rearrange blocks a bit to add few more actions. We can drag and drop the block in the sequence window to move them. Move with the mouse button over the block, but take care that the cursor doesn’t change to drag the connection lines.Then press and hold the left mouse button to move the block. In the example below we have moved the IF block to gain more space.
In the same way, we should move other blocks to gain space for one more block.
Click on the connection line between Load setup and Wait for user and press Delete button on the keyboard. The connection line is gone.
Now let’s add another Action. Add it over the Load Setup to connect to that and then manually connect the Action with Wait for user block.
I wanted to show you the longer way that you get skilled with moving around the modules. If a single module needs to be added, there is a much simpler way to add a block. Simply place the new block on the upper one under which the new module should be inserted and all other modules will be pushed away. The new module will be connected with the upper and lower one.
Now let’s choose Set Main Tool Bar action. This is a great action which allows us to navigate through Dewesoft X menus as we would press the buttons manually.
In the property panels, we need to enter the Tab and the Button name.
In the picture below you can see which are tabs and buttons in Dewesoft X.
In this example, we would like, that the software asks for storing location, before proceeding with the measurement. That's why we first need to select Ch. setup as our TabName and Storing as our ButtonName.
If we want to prevent the user to change the screens or to stop, block, accelerate the execution of the sequence we need to go to Settings and remove the tick in front of Show Sequence Control ToolBar and before Show display property panels and channel selector.
Let’s run the sequence again. This time the sequence will stop in Storing screen allowing the user to enter the file name, storing conditions and acquisition rate.
Please note that we don’t have a chance now to control the execution of the sequence. The only available button is the continue button. In measurement screen, all the properties are hidden.
In the analyse mode, the only available buttons are the selection to make another measurement or exit the sequence.
With few simple settings, we have made a very simple user interface for the end user and hide all in depth abilities while and, therefore, prevent mistakes during the measurement process.
In this section, we will look in detail to each block that can be used. Since there are many possibilities in the sequencer, there are also many options to choose from.
Each option has a Text info which will show at the top. We have seen the usage of the text info already in the short example, but it has also one interesting option. It can parse variables or channels and show them in the upper bar. As we can enter a variable in the formula we can also enter it in the text info.
During measurement, it will show up as a real value and will update with display refresh rate.
There are several blocks to help you build your sequence:
Actually here are all the functions that are also available from Dewesoft X's programming DCOM interface, so the sequence is actually an easy visual way to program the execution work flow like it could be done in any external programming language. Commands are the same as in Dewesoft X DCOM… We can also look at the sequencer as the easier to use replacement for the classic programming languages.
Action can be chosen from the list shown on the right side under DCOM structure caption.
Some of the properties have the parameters which can be edited in Parameters list. Help will provide short-form information on what the action does.
There are many possible actions shown here in alphabetical order.
AO Set Manual action
If the function generator is set to Manual output, the user can choose whenever the output will start.
The action is the same as if the user would press the Manual button to start the function generator (shown below).
This action puts Dewesoft X in Analysis mode like pressing Analysis button on the screen. Please take a look also to the Measure action.
Export Data action
This action exports the data. It is replaced by ExportDataEx which has more parameters, but this function can still be used if these additional parameters are not needed.
ExportDataEx will export the opened file with the extended set of parameters. Please note that the file must be open in Analysis mode to call this action.
There are several parameters which must be set.
The export type defines the type of the export to be used. The list of exports is enumerated in the same way as the drop down list in the export is shown. We can find all the export type files if you go to Analysis mode -> select Data file -> go to Export -> File export.
So we need to enter:
0 … Flexpro (*.fpd) 1 … Excel (*.xls) 2 … DIAdem (*.dat) 3 … Matlab (*.mat) 4 … Universal File Format 58 (*.unv) 5 … FAMOS (*.dat) 6 … NSoft time series (*.dac) 7 … Text (*.txt) 8 … Sony (*.log) 9 … RPCIII (*.rsp) 10… Comtrade (*.cfg)
Custom exports must be enumerated with negative values starting with -2. The custom exports depend on the installed exported (.exp) files. In our case from the screenshot above it would be:
-2 … Replay -3 … Google earth KML
Time axis defines the how the time will be exported:
0 ... relative 1 ... absolute 2 .. .from trigger
The property corresponds with this selection:
Export Data type
Defines which data is to be exported:
0 ... full speed 1 ... reduced (with speed defined in the reduced rate)
The property corresponds with this selection:
Defines which data will be exported at reduced rate. The value is a set from:
1 … min 2 … max 4 … average 8 … rms
So if we want to export min and max, we need to enter: 1+2=3. If we want to export min and RMS, we need to enter 1+8=9. The property is important only if reduced data is exported and corresponds to this selection:
Defines the file name to be exported.
If the file extension is not defined, the default file extension will be taken.
If the file-path is not defined (just the file name is entered), then the default export folder will be taken.
If not even a file name is defined (field is blank), then the loaded Dewesoft X file name will be taken.
Hardware Setup action
This action will open the Settings window of Dewesoft X.
Load DBC action
This action will load the DBC file for CAN ports. You have to define the port number and File name of DBC library to load. It is the same action as the DBC/XML Import found in CAN setup:
Load File action
This action will load the Dewesoft X data file. If the file name is wrong or if it is not defined, it will show the dialog to choose the file manually. If the path is not defined, it will try to load the data from the main data folder of the currently selected project.
Load Project action
This action will open the project file. This brings the sequence above setup as well as above project files. It allows to load in one single sequence different projects and different setups.
Load Setup action
This action loads the setup. A file name must be defined. The action is the same as the Load Setup main block.
This action will put Dewesoft X in Measure (Acquisition) mode. It is the opposite action from Analysis and has the same effect as clicking on the Acquisition button.
Measure Sample Rate Ex action
This action will change the measure sample rate. Property MeasureSamplerate must be set to the new wanted sample rate.
IMPORTANT: Dewesoft X must be running in Acquisition – Ch. setup screen that this command is taken.
New Setup action
This action will open a new setup. It is equal to the Dewesoft X button – New setup menu item.
Pause Storing action
This action will pause storing. It is equivalent to the Pause button and works in conjunction with Resume. Dewesoft X must be in Measure mode and should be storing the data that this command is valid.
Print Screen action
This action will make a screen dump to the printer. It is the same as the Analysis Print command.
Reduced Rate action
This action will set the reduced rate of the data. Please note that you need to be in Measure – Setup screen that this command is valid. It is the same as the Static acquisition rate entry field.
Resume Storing action
This action will resume storing if paused. It is equivalent to the Resume button and works in conjunction with Pause. Dewesoft X must be in Measure mode, should be storing the data and should be paused that this command is valid.
Save Setup action
This action will save the setup under the defined file name. If the file name is empty, it will store the currently loaded setup.
Send Key action
This action will send the key stroke to Dewesoft X. The parameter Key is the key code according to the character map.
Set Instrument action
This action will change the shown display. The Id parameter defines the main index of the screen. This command is valid only in the measure mode. In this case 0 will set Overview, 1 will set the Scope, 2 will set the Recorder and 3 will set the FFT regardless of the display name.
Set Main Data Dir action
This action sets the main folder of the data.
Set Main Toolbar action
This action is very important. It sets Dewesoft X to the certain mode. The TabName property defines the name of the main tool bar. Here a Name of the main tool bar must be entered (like Ch. Setup, Measure, Print and so on). Please note that some of the tabs are not always available and depends if Dewesoft X is in Measure or Analyse mode.
The next selection – Button name defines which main menu button will be selected. Here it is again important to take care which buttons are available in which menu.
Set Screen Index action
This action changes the sub displays. If the main display has several sub-screens, this action can change between them.
Set Store Mode action
This action can set the store mode. Possible values are:
0 … always fast
1 … always slow 2 … fast on trigger 3 … fast on trigger, slow otherwise
Setup Sample Rate action
This action changes the setup sample rate. It is similar to the Channel setup sample rate option available in the Settings window. Please note that Dewesoft X must NOT be in the acquisition setup mode when this parameter is set.
Setup Screen action
This action changes Dewesoft X to the setup screen mode.
Shown Property Frame action
This action shows or hides the property frame and channel list while measuring.
Show SR Options action
This action will show or hide the sample rate panel in Ch. Setup – Storing and Ch. Setup – Analog tabs.
Show Store Options action
This action will show or hide the storing options in Ch. Setup – Storing and Ch. Setup – File details. It is important if we want the user to be able to change the header entries, but not the file name.
This action will start the measurement.
Start Storing action
This action will start storing the data. Dewesoft X must be in the Measure mode that this command is working. It is the same as the Store button.
Stay On Top action
If the property StayOnTop is true, then Dewesoft X will be always on top even if another application has the focus.
This block is used for making a decision. The decision is based on user choice where the question is asked in the Text info and the user answers with Yes or No.
Another option is to make a decision based on the value. We can add any number of conditions by pressing plus and minus. In the first field, we can add any channel and then choose either >, <, = and != (not equal). In the second field, we can also add a variable OR we can enter a fixed value.
This block is used to repeat a certain workflow fixed number of times. The only property is the number of repetitions. We need to connect to Yes the blocks which need to be repeated and to No the blocks which are following the Repeat block.
This action is used to wait for a certain amount of time defined in the delay field. Time is defined in seconds.
This block is used to wait for a certain event. It can wait for user interaction. It will output a Text info and show Continue button. The execution of the workflow will continue when the user has pressed it.
Another option is to wait for a value. We can add any number of conditions by pressing plus and minus. In the first field we can add any channel and then choose either >, <, = and != (not equal). In the second field we can also add a variable OR we can enter a fixed value.
The third option is to wait for a trigger. We can either wait for the start or stop trigger. Dewesoft X must be in store mode with triggering so that this option is valid.
This block is used play audio, video files, slideshows or outputs text-to-speech. A short video or audio instruction might be the valuable help for the unskilled user. We can choose from .avi, .mkv, .mov, mp4, mpg, wmv, mp3or .wav files.
Another option is to create a slideshow to show. We can enter any number of pictures and define delay between them.
The third option is text-to-speech. This option gives usability that the text is output to the speaker which is written in the entry field. Also here a value of the channel can be entered, so if we have AI 0 at 40, the computer will say “Temperature is 40”.
This block is used to record and replay Macro. With pressing the Play sequence and Record Macro, Dewesoft X will execute the sequence up to the point where Macro needs to be recorded and then we can operate the mouse, keyboard or even record the voice during our actions.
When playing it back, Dewesoft X will repeat the same actions.
This block is used to set variables or control channels. We can set the data header values, internal variables used in math or control channels which operate analog or digital output.
The first entry is the channel which we will set. In the example below we will define the data header variable. Since this variable is set to Text, we must enter the value with the double apostrophe.
If the variable is integer or float, we can enter the value or enter any Dewesoft X channel with full function of math formulas. We can, for example, define the counter. In the Project setup – Internal variable, I defined the ‘CNT’ variable which can be used like shown below. On each transition of this block, the value will be increased by 1.
This block can also set the control channels. In the example below the frequency of the function, a generator is set to 50.
This block is used as the black box which can hold more modules to reduce the complexity of the main sequence. Please note that on the upper bar you have a choice to see the main sequence, event actions or Custom blocks. If we go to the custom block, we can add a new one by pressing + button. After defining the blocks, we can enter this single or multiple times in the main sequence by adding a custom block.
The only thing to define in the custom block is the name of the block.
This block is used to perform actions on the files.We can, for example, run an external program with some parameters, delete, copy or rename the files.
Opens or executes the file defined in the file name. This is similar to Start – Run … option in Windows. We can also define parameters for executables.
The second option is to Copy files. We can either Copy a series of files or choose to Copy last stored file to a defined Destination folder. This is used, for example, to create backups on network drives.
Another option is to Delete defined files or last stored file. We can, for example, ask the user if the measurement is ok and if it was not, delete the last stored file.
At last, we can also rename last stored file to a different name which can be either fixed or defined by the user.