NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

CAPL with TestStand

According CAPL recommandations :

 

Important: The assignment of a CAPL function to a variable can only be done in the OnInit event handler of the Measurement object. This means that the variable used to access the Measurement object must be declared using the WithEvents keyword in Visual Basic.

 

How to do this "WithEvents" in TestStand, I do not want to use Visual Basic, just TestSTand...

0 Kudos
Message 1 of 14
(7,606 Views)

Why have you started a new thread!

Regards
Ray Farmer
0 Kudos
Message 2 of 14
(7,601 Views)

Because I think it is a new subject. Is it possible to drive CANoe from TestStand without LabView or something else. 

 

Basically, I'm trying to call CAPL functions from TestStand sequence and it does not work, the GetFunction call from TestStand gives a run time error...

0 Kudos
Message 3 of 14
(7,599 Views)

I have never used the Vector products, but it might be that you will have to create a wrapper function to interface to TestStand rather than interface directly with CAPL.

 

What error is being reported?

 

Regards
Ray Farmer
0 Kudos
Message 4 of 14
(7,591 Views)

In fact, I have to call GetFunction on a OnInit event with TestStand. GetFunction is an API Vector which shall be called under OnInit. 

 

According CAPL :

Important: The assignment of a CAPL function to a variable can only be done in the OnInit event handler of the Measurement object. This means that the variable used to access the Measurement object must be declared using the WithEvents keyword in Visual Basic.

 

I do not want to use Visual Basic or something else. I would like to only use TestStand. How to catch the even OnInit with TestStand ?

0 Kudos
Message 5 of 14
(7,588 Views)

Do you have OpenTest because the documentation says that you can generate TestStand SequenceFiles from OpenTest that will run your CANoe.

 

I would suggest you get in touch with Vector to help you.

Regards
Ray Farmer
0 Kudos
Message 6 of 14
(7,583 Views)

Ok, I will see thank you.

 

Is it possible to do an action in TestStand on a callback Active X ??

0 Kudos
Message 7 of 14
(7,580 Views)

The TestStand ActiveX adapter does not support events. If you need events, you will likely have to write a code module which handles them.

 

-Doug

0 Kudos
Message 8 of 14
(7,562 Views)

Hi Doug,

 

One of the reasons why i have decided  writing a CANoe wrapper around the CANoe .Net api  was that i had no experience about handling events in TestStand.

 

Just for future projects. Are events in Teststand .net steps possible? I think such a feature is not quit easy in a sequential system.

 

Still learning

Juergen

 

Hi slf,

 

If Dougs answer is bad.

I recommend to write a wrapper around. The .net Api. In my case it is working like a charm.

I am able to Load/Start/Stop applications. Reading and writing of Signals/Sysvar and environments.

Running CAPL and Testfunctions Starting some records and some other features of CANoe.

If you are not able to write a wrapper just take a look at on some Ni-Alliance Partners in your region.

I am sure they will help you.

 

Regards

Juergen    

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 9 of 14
(7,556 Views)

Hi, thanks for your annswer.

 

What do you mean exactly by "wrapper" ? Do you mean that I have to develop a DLL (in LabWindows for example) which will be used from TestStand ?

0 Kudos
Message 10 of 14
(7,545 Views)