Problems with Automated Device Testing
I have a setup where my goal is to automatically test a device that reads out sensors. I’m simulating the sensors using analog output channels of the SIRIUS and the test should simulate specific points (let’s say 10) along the whole sensor range. Each point should be held for a certain time to let the value on the measuring device stabilize, then the user should read the measured value on the device and enter it into Dewesoft (for now, I’ll automate this too in a later step by getting the feedback via the CAN-Bus)
I created a sequence that iterates through 10 variables that have the voltage values stored in them and asks the user to enter the measured value after three seconds using the “Form” Block. I got this from this post: How to iterate through a list of variables using the sequencer
My problems are:
- Creating a variable for each measurement point is quite a mess if we need more than just 10 points. Is there not a better solution to that? My Idea would have been to use a “vector matrix constant” but it seems like they can’t be accessed from the sequencer. I can’t just use an arbitrary function that runs through the values because I need to wait for the user Input before going to the next value.
- To store the values the user entered I need again 10 variables. It would be great if a vector could be used for this as well, but I think that’s not possible, right? This is tedious, but what’s even worse is that to select into which variable I want to store the user input (store into the first variable after the first simulated value, in the second after the second value etc.) I seem to need my counter variable and a whole tree of if-statements. This is a pretty crappy solution and I hope it’s just due to my inexperience with Dewesoft. Please tell me there is a better way to do this!
- In the end I’d like to create a graph that shows the difference between the measured and the expected value, and a tolerance band I defined. My current solution is again not really nice using once more 10 variables to calculate the difference and then plotting them using a 10-channel vertical bar graph.
My goal is to run many tests like this, but I think it’s obvious that this is quite a mess and not really scalable in the way I did it.
Could somebody give me some pointers on how I could improve my measurement setup and sequence with some tools in Dewesoft that are hopefully better suited than the ones I used up to now?
Thanks a lot for your help!
maybe I get your problem wrong but in my opinion you only need two variables. One represents counter for the specific point number (eg. 1 to 10) and one that reads the input from the user. Now you can iterate the counter variable from 1 to 10 and write it to a formula or a global variable. In the setup you use the counter variable as input for a scaling table, and the output from the scaling table is used for the sirius analogue output. So the sequencer runs through the steps (which could also be a variable) and the setup knows which values should be tested at which step.