03-04-2015 10:48 AM
How do I set an environment variable in CANoe from TestStand?
I'm pretty sure I can do it using the ActiveX/COM adapter in TestStand, but I'm not exactly sure how.
03-05-2015 05:03 AM
Hi Jaime_C
I think it is possible to use the Active X for that task. - I do not use that.
In my case i am using a small .net wrapper around CANoe.Interop Assembly
This is working pretty stable.
For more information just visit these threads:
http://forums.ni.com/t5/NI-TestStand/CAPL-with-TestStand/m-p/1869959/highlight/true#M36182
http://forums.ni.com/t5/NI-TestStand/TestStand-with-CANoe/m-p/1850889/highlight/true#M35982
Depending on your task there a other possibilities:
I am thinking on Vectors FDX-Protocol or even on ASAM XIL 2.0.0 Stanard if you are using CANoe 8.2.x
If you are faoumos with LabView you can read/Write direcly in from CANoe in a LabView variable.
This uses also FDX
http://www.testing-expo.com/europe/12txeu_conf/pdfs/day_1/3._Tuesday_11.05_Gunnar_Stein.pdf
and there some Examples available.
Regards
Juergen
03-05-2015 07:36 AM
Hi j_dodek,
Thanks for the reply. I did see those threads when I was searching for a solution but I wasn't able to complete my task after reading them. I'll read them a little closer and try again.
Also I'll give you some context for my problem. I'm using TestStand 2014 to test my product, but I won't have a prototype for several weeks so I'm using CANoe 8.2 to simulate the DUT on the CAN bus. I'm manually changing environment variables so that CANoe sends CAN messages with the signal values I need to proveout my tests.
Because this is a temporary solution I don't want to spend a lot of time developing a programmatic interface to CANoe, but if it's a matter of hours it would be well worth it.
03-05-2015 12:40 PM
Hi jaime_c,
just for understanding. Why setting enviroment variables? Starting some Capl stuff with them?
Do you want to load and start your CANoe config with TestStand, too? Or do like to hook on CANoe
and write the enironment variables.
At the moment on my machine is no CANoe available. But i think with 3-5 .net CANoe interop assembly calls
this hook should be possible in TestStand.
Regards
Juergen
03-05-2015 01:05 PM
Yes, I'm using the environment variables on a panel in CANoe, and a CAPL nodes sets the CAN signals according to the environment variables. Right now there's a message box in TestStand to prompt me to set the controls in the panel but I would love to set them programmatically from TestStand.
I don't need to load the cfg and start CANoe, I just need to hook into a cfg that's already running and set the environment variables.
03-06-2015 12:53 AM
Hi Jaime_c
I also wanted to know how many step are requiered to do a simple hook.
I hooked on Systemvariables because in my projects i prefer them.
The hook is done for Vetors Example:
C:\Users\Public\Documents\Vector\CANoe\8.2\CANoe Demos\Demo_CAN_CN\Easy\Easy.cfg
With it you can turn on and of the ignition key
Hope that helps
Juergen.
OH you can do that with 5 Steps (if you are using right variables....)