NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Make c/c++ call default to setting an error from return value

I'm currently writing some test stand sequences using C/C++ dll adaptor. My dll returns a zero if there is no error. I'm currently setting the Result Action to If Value!=0 Error.Occurred = True for every step, but this is both tedious and more importantly risks me missing a step and potentially ending up with a test which claims to have passed when an error occurred on one of the steps. Is there a way of making a non-zero return value cause an error by default for this adaptor type?

0 Kudos
Message 1 of 4
(2,614 Views)

Easiest way might be to simply drag a step with correct settings to Templates and then add new steps from this template in the future, alternatively create a costume step type.

 

Best regards

0 Kudos
Message 2 of 4
(2,568 Views)

Hi

 

thanks for that.

Unfortunately this has come about after the fact, i.e. I've got multiple sequences containing many of these function call steps and am currently rather laboriously going through each and changing this setting.

I was kinda hoping for a Station Option or something I could set which would do this by default - it seems like a fairly standard thing to do to raise an error if a function call return value is non-zero...

0 Kudos
Message 3 of 4
(2,548 Views)

Oh okay I see what you mean, though I don't think that is possible, at least from what I know. It seems this property (edit call - specify module under substep in step type) cannot be changed for the standard step type if your using this. But also, could you add your c/c++ dll function to a numeric limit test step with comparison '==0', then if not zero Error.Occured should be set to true? But then again that is only a way to construct each step or a costume step to insert and not changing multiple already inserted steps...

 

Best regards

0 Kudos
Message 4 of 4
(2,544 Views)