VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Configure Database Xnet from Veristand API

Hello,

 

I'm currently developing an application where I need to change the length of the CAN frames automatically via TestStand using StepTypes (VERISTAND API).
So I wanted to know is that there is a way to change the length of the frames knowing that the program runs on the target and I want to change the size of the frames when necessary.

For now I saw that we can modify the size of the CAN frames in the Xnet database but how to make it automatic from the Api Versitand.

Cordially.

 

0 Kudos
Message 1 of 5
(2,900 Views)

Hello ,

 

Maybe the example and the document that refers to the link bellows can help you :

 

http://zone.ni.com/reference/en-XX/help/372846G-01/vsnetapis/lv_sysdef_creating/

 

Cordially

Ingénieur d'Application | (NI France)
0 Kudos
Message 2 of 5
(2,871 Views)

Thank you for the link,

Can I modify the Xnet  database (playload Length) , while my veristand project is running? Because the lenght of  my CAN Frame change during the Test.

And can I use in a model or custom device the method specify in the link  without creating a conflict with the Xnet CD.

0 Kudos
Message 3 of 5
(2,831 Views)

Hi yeito,

 

No, you can't modify the XNET database while your project is deployed and running.  The biggest reason for this is that the XNET session is created after the database file is finalized.  The XNET session which is created uses a specific instance of that preconfigured database.  The XNET session is created upon deployment and there isn't a way to programmatically modify the state of an XNET session.  With that in mind, if we want to modify the database, we'll have to restart the XNET session in order to reference those changes to the database.  

 

In general, this is true of most of the configurations you make in the System Definition (or with the System Definition API) - they can't be changed at runtime.

 

I would highly recommend using the built-in XNET functionality rather than a custom device as the in-product features are officially supported and likely function better than a model or custom device would.  Cyclic-event frames got added in VeriStand 2015 SP1 if that's relevant to your application.  

 

To get the best idea of a workaround, can you explain what the CAN frame changing during your test means?  Are you trying to characterize multiple ECUs that communicate differently within one test?

Matt | NI Systems Engineering
0 Kudos
Message 4 of 5
(2,771 Views)

Also, you could log the raw frames and analyze them later in post-processing.  If you're just doing bus monitoring this is an option.  However, if you're implementing control with XNET, we'll have to explore other options. 

Matt | NI Systems Engineering
0 Kudos
Message 5 of 5
(2,769 Views)