VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Modulus Function aka Mod or %

Solved!
Go to solution

I was wondering if there is any additional mathmatical functions in the Calculated Channels Formula settings.

 

Thanks

formula.png

Tim
0 Kudos
Message 1 of 8
(6,372 Views)

I'm not sure if there are any "unlisted" functions in the calculation engine, but a fairly easy way to add functions is to create a LabVIEW model and import it into VeriStand.  The basic process is create your VI, assign controls and indicators to the connector panel (mark necessary inputs as required), then under the Tools menu in LabVIEW select NI VeriStand: Generate Model from VI...  This generates an lvmodel file that you can add to VeriStand as a Simulation Model.  Your connector pane IO becomes inputs and outputs to the model.

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

Good Idea but my version of LabView is rediculously outdated (v2009) and I don't think it supports what you are asking me to try.

 

 

 

Tim
0 Kudos
Message 3 of 8
(6,355 Views)

This is built in LabVIEW 2014 and works in VeriStand 2014 (might work in earlier versions???).  It is just the standard LabVIEW modulus function available in the palette.  If you are running (much) older VeriStand then this won't work for you.  As plan B, you could create a simple custom device but that is kind of overkill for just a function implementation.

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

I have Veristand 2014.  How would I use the model you attached?  Please keep in mind I am very new to Veristand.

Tim
0 Kudos
Message 5 of 8
(6,344 Views)
Solution
Accepted by smoothdurban

In System Explorer, browse to Simulation Models (typically Root:Targets:Controller:Simulation Models), select Add Simulation Model (button on toolbar when you select Simulation Models, you should be able to leave all options at defaults).  Give it a name and browse to the model file, click OK!  and you should be good to go!  Deploy and put some controls and indicators down and link them to the model inputs (controls) and outputs (indicators).  Also, there's probably a white paper on this somewhere on NI's site (at least the adding models stuff).

 

0 Kudos
Message 6 of 8
(6,342 Views)

I got it to work awesome

 

Can you generate models using matlab?

Tim
0 Kudos
Message 7 of 8
(6,336 Views)

You need to use Simulink and Real-Time Workshop (Mathworks products that go with Matlab).  Real-Time Workshop compiles Simulink models into a DLL file that VeriStand can run (just like a lvmodel file).  Last time I did that was around 2011 or so.  Once you get it all working and setup on your machine, the process isn't too bad except for the mega $$$ you'll need for Matlab, Simulink and RTW.  VeriStand supports a few other model types though I have no experience with those.

0 Kudos
Message 8 of 8
(6,334 Views)