Errors during Sequence Operation

Patrick Hobart

Posted on 08.01.2018 15:08

We have been using DEWESoft in some of our automated testing. We use several IF blocks to determine which state we are in, and which branch of the sequence to execute. We typically are looking at measurements that we have made during a "scan" profile. Occasionally, we see an error during the IF evaluation that a measurement does not exist. When this occurs, the sequence essentially stops working. I have not been able to find any error handling in the sequencer functions to define what happens when an error occurs. When errors occur, data collection on the test is broken and requires external user help to start again.

What should I be doing to prevent this from happening? Is there a way to check to see if a measurement exists in the file before reading it with the IF statement? or is there some error handling function that I am not familiar with? Any help would be appreciated.



DEWESoft Support
Technical support
Posted on 15.01.2018 15:26

Hi,

the sequencer's developer and I have looked at your use case together. We've discussed adding an option to the calculation block, which would check if the channel exists in a file. Would that be enough for you? You could store the True/False value in a variable and use it to determine if you want to proceed with your if statement or not.

The only second thought that I have is if you're using a channel in measure mode, and the channel doesn't have a sample yet. That's probably extremely rare, but it might happen. Do you think you'd run into this issue, or is the above mentioned solution enough for you?

There isn't really any error handling in the sequencer at the moment.

Patrick Hobart

Posted on 15.01.2018 15:35

I think your solution would most likely fix the issues we are seeing. Thank you for looking into this!

Dino Morio

Posted on 16.01.2018 17:31

Hi. Just to add to this conversation, I have been having similar problems with the sequencer. Dewesoft ought to think about adding some basic error handling mechanism. For eg. an OnError is raised, so that it allows the user to bring the automated testing to a controlled stop rather linger in the air.

Quite often the device being tested don't always tolerate uncontrolled interruption, and you may end up damaging it.

DEWESoft Support
Technical support
Posted on 17.01.2018 14:31

Hi,

it's no problem. Also, an OnError event sound like a good idea. I'll discus it with the development team and I'll get back to you.

Dino Morio

Posted on 18.01.2018 10:54

Thanks

DEWESoft Support
Technical support
Posted on 30.01.2018 09:29

Hi,

I have some updates for this thread. Adding sophisticated error handling to the sequencer is not possible in it's current iteration, because it works on a single process line. To have the sequencer working based on events, we'd need to have dedicated threads that would constantly check for errors or other types of events. The core design of the sequencer doesn't support this, so it's no possible to add it at the moment. We'll certainly keep this in mind for future versions of the tool.

In other news, our development team has added an ability for you to check if a channel exists. This is done through the calculation block by calling the function in the attached picture. As an example, calling IApp.Data.FindChannel(AI 1) will return a 1 or a 0, depending if that channel exists. You can also use a variable for the channel name, you just have to add '' marks around it.

The version that has this update (X3 SP3) has just become available online. I'll also put in a request for another feature, which would return 1 or 0, depending if the system is in acquistion mode.


Attached files:
Patrick Hobart

Posted on 30.01.2018 15:17

Thanks for adding this. We will definitely look into updating to this revision. The error handling seems pretty important. We have seen other instances where the acquisition systems, for various reasons, seem to go away. We occasionally see instances where a Krypton is not seen by DEWESoft on launch, or one of our DAQ's reports that there is no power, which we have to power cycle to get back online.

I'm glad its on your radar, and you were quick to respond. Thanks!

DEWESoft Support
Technical support
Posted on 02.03.2018 14:18

Hi,

I would like to notify you that another one of the features that we've discussed in this thread had become available online. In the latest DEWESoft X3 SP3 DEV-180302, you can now check if DEWESoft is in acquisition or not using the sequencer. This is done with the calculation block using the "isAcqRunning" function. I've attached an image of the function.


Attached files:
Login to reply to this topic. If you don't have account yet, you can signup for free account .