Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
Ni.com is currently experiencing issues that may cause some pages to fail.
Support teams are actively working on the resolution.
06-20-2012 06:50 PM - edited 06-20-2012 06:55 PM
Hi,
This is a bit of a twist relating to the post in the VS Playback of An Array. I would like tp generate a pt by pt signal from a LV model, as opposed to using a custom device or the real time stimulus tool. The reason for this is that we already have LV models that generate pt by pt signals, such as a sine, with or without noise ...
The model generates a sine wave based on a time (ti) variable read at each iteration. This time around we have a specific altered sine-like signal, more like a garbled sine that we want to generate in the HIL. I have a one cycle of this signal as a XY data set. In LV-RT this would be a no-brainer. How can I do this in VS though? Ideally I would pass the XY arrays for my data, and based on time t(i) I'd pick the proper Y value...
One idea that comes to mind is to have one model parameter being a XY cluster of 2 arrays (X and Y) ( or just 2 arrays) and dump into them the one-cycle data to be used in the model. At run time, based on ti+"modulo cycle time" I can pull the Y value out.
This approach has to be a "push", to pass the XY data once at the beginning, Any way to do a "pull" instead from the model side, from a file location on the RT side maybe ?
Thx.
Laurent
06-20-2012 10:43 PM
06-20-2012 10:52 PM
06-20-2012 11:29 PM
HI Stephen,
Yes basically this is it, a lookup table. So I guess the only trick is to pass it at the right time, when this part of the model is activated...
Yes, Controls and Simulation Module... good point, but we don't have the license for it. Maybe if I beg...
Thx
L.
06-25-2012 11:50 AM - edited 06-25-2012 11:51 AM
06-26-2012 06:17 PM
Hi Laurent,
Stephen can correct if I'm wrong, but I believe he meant for you to implement a lookup table within the model. Here's a little information on how you can create a look up table in LabVIEW: http://digital.ni.com/public.nsf/allkb/6E53D59537D50EAA8625735D0060BA2C
Also, the link in your previous post links back around to this thread. Did you mean to link a different thread?
Kind regards,
Alisha P
Applications Engineering
National Instruments