From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Import Hardware with excel

Hi everybody !

 

I use the .NET method to import my Hardware configuration and the API Simple System Definition. That works well ! https://decibel.ni.com/content/docs/DOC-26812

 

Unfortunatly, with this method, it is only possible to specify the channel number (so for the Analog I/O), not the port and the digital line (for the Digital I/O)...

 

Do you have any idea to my problem ?

 

Many thanks !

0 Kudos
Message 1 of 8
(4,749 Views)

Hi Nicopas,

 

Were you able to find your answer? Can you be more precise about what you are trying to do rather than how you are trying top do it? This may help us.

 

Thanks

0 Kudos
Message 2 of 8
(4,661 Views)

Hi Jun,

 

The Simple Veristand System Definition API is useful, moreover with the possibility to import the Hardware from Excel. I want to use this feature but I can give the port number and the line for the DI/O. I suppose I must modify the code but I don't know how to do that ...

0 Kudos
Message 3 of 8
(4,645 Views)

Hi Nicopsa,

 

Can you be more precise on exactly what your are trying to do? As a big picture, without talking about the API?

For exemple you can tell me "I have a Siemens PLC and I need to add it's inputs/outputs to a VeriStand System def File programmatically".

Do you understand what I am asking for?

 

Thanks

0 Kudos
Message 4 of 8
(4,641 Views)

Ok to sum up,

 

I have a hardware configuration, with some DAQ board and FPGA. My goal is to add it automatically with a VI, on my VeriStand Project.

Use this API could be a good solution, but I can't precise the line and the port for the DI/O, that's why I am here

 

Is it better ?

 

0 Kudos
Message 5 of 8
(4,637 Views)

Can you add this Excel file here? Where does it come from exactly?

What is your DAQ device and your FPGA? Are they changing?

Why do you need to add them to VeriStand using this file?

 

Having more information on what you are trying to do is very usefull to see what other possibilities we can use. Maybe using this API is the best one, maybe it is not. With only part of what you are trying to accomplish, this question cannot be answered.

 

Thanks

0 Kudos
Message 6 of 8
(4,634 Views)

Currently, the Excel file looks like this (in PJ). A template could be find on the API page, we just integrated one of our hardware configuration, for test.

You can see the template on the API web page here : https://decibel.ni.com/content/docs/DOC-26812

 

The Hardware configuration will change, because of the diversity of our project. We are working with HIL test bench, so the Hardware depend of what we are testing. The main goal is to have only one VeriStand project, and add automatically the Hardware specification, with a button for example on a VI.

Moreover, it will be more easilly for our technicians to change the Hardware configuration on an Excel file instead of on VeriStand.

 

For the DAQ device, we use some PXI board (6221, 6528 etc ...), and they are controled by a CompactRIo. The FPGA don't change and it is a PXI-7833R (but the .fpgaconfig file will change)

 

I think this API is the best solution for us, because we alreasy use it to add automatically our Simulation Model, CAN configuration etc ...

0 Kudos
Message 7 of 8
(4,631 Views)

Keep in mind that you're asking how to modify a fairly complex example...you should probably just learn the code...

 

However, from looking at it quickly, it looks like the example calculates the port for you based on the DIO address based on 8 lines per port. If you look within the example VI, and then within "Convert Excel to NI Cluster.vi" function, you can see where it's making that calculation:

 

dio port.JPG

 

So, you could either let it continue to calculate your port for you based on the line number you specify, or you could add additional code in there to allow yourself to specify it. Hope that helps!

 

 

0 Kudos
Message 8 of 8
(4,610 Views)