NI VeriStand Add-Ons Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

How to set the Cam property in the VeriStand Custom Device 'Engine Simulation Toolkit using the VeriStand .net API in LabView?

Solved!
Go to solution

Hi,

I would like to set the Cam property, plus others, in the VeriStand Custom Device 'Engine Simulation Toolkit using the VeriStand .net API in LabView.

I have gotten to the APU 1, Section in the VeriStand .nivssdf tree with the LabView VI but need to get to the 'Cam' in the 'Digital Patterns'. 

The attached file, Configure_Cam.png, shows the values I would like to set / change.

File Rig_Project.nivssdf, also attached is the VeriStand system definition file I am using

File UpdateSysDef_CamTarget_R1.vi, is the LabView file I am trying to use the VeriStand .net API to set the Cam parameters with.

Any help is appreciated,

Thanks

0 Kudos
Message 1 of 8
(8,654 Views)

PJD123,

I think we misseed your picture.  Let me see what this is about and I'll help if I can.

Thanks,

Andrew

0 Kudos
Message 2 of 8
(6,956 Views)

Hi Andrew,

It should of been in the ni.zip attachment.

Did the ni.zip file make it through?

Thanks,

Perry

0 Kudos
Message 3 of 8
(6,956 Views)

I don't see anything.  Was it just .png's and .vi's?  If so, that's weird.

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

Hi,

I have attach the files to this email. It is 3 files this time, no zip file. A .png file and .vi file and a .nivssdf file.

Let me know if you get them.

Thanks

0 Kudos
Message 5 of 8
(6,956 Views)
Solution
Accepted by topic author PJD123

Hi PJD123,

You will need to go deeper into the custom device hierarchy to get those properties then what you are currently doing in your example VI. Change the FindNodeByPath nodepath Targets/Controller/Custom Devices/Engine Simulation Toolkit from to Targets/Controller/Custom Devices/Engine Simulation Toolkit/APU 1/Generations/Digital Patterns/Cam. Then change the NodeIDUtil from IDToCustomDevice to IDToCustomDeviceSection. This way you get a reference to the Cam section which the properties fall under.

From there you can use the Set<DataType>Property methods to change the properties you are interested in. Note that the DataType is dependent on the property you are choosing to change and these can be found by opening the *.nivssdf as XML. As an example the Digital Pattern Width is double so you would use the SetDoubleProperty with the DigPattrn.Width as the property name.

Best Regards,

Lynn

National Instruments
Senior Systems Engineer
0 Kudos
Message 6 of 8
(6,956 Views)

Hi Lynn,

That worked! Thanks for your help.

Perry

0 Kudos
Message 7 of 8
(6,956 Views)

Hi Lynn,

Sorry to bother you again, but….

Now I am trying to get this to work using TestStand (setting the same Cam Property) and am having troubles.

I can get it to Get the Cam Property but I cannot get it to Set the Cam Property.

Attached are the two TestStand .seq files. Filename Get_CamNumberOfTeeth.seq works. Filename Set_CamNumberOfTeeth_R2.seq does not work. Do not get any TestStand errors when running it.

The only difference between the two is in Step 3, in the .Net Invocation is a SetU16Property instead of GetU16Property. And the save System Definition file Step.

The two .seq files should be attached.

I know I could just call the LabView VI from TestStand, but we have reasons to keep everything in TestSTand.

Again, thanks for your help

Perry

Download All
0 Kudos
Message 8 of 8
(6,956 Views)