NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member BSI
Member
BSI
Posts: 187
0 Kudos

Re: Workspace Data Rendering

[ Edited ]

Part 2 of 2:

 

To recap:

- VIs from part 1 and DeltaloopTime.vi are used by the model vi.

- the Test RT GenVolt Updates - SW Timed.vi used the model vi with RT to test it.

 

In RT,  it works fine, when you increase the timed loop iteration rate > 1kHz, the digitization of the procuded sine is at the correct rate.

In VS, the digitization appears fine as per the small spikes I can see on the scope at the right rate, however the sine values only updates at 1kHz, no faster even when PCL is set > 1kHz.

 

L.

Active Participant
Devin_K
Posts: 305

Re: Workspace Data Rendering

Hi Laurent,

 

I figured out what was wrong with your model.  The short answer is that you need to remove the conditional disable structure from DeltaLoopTime.vi (getting rid of the Windows case). 

 

The way it is currently compiling, it is using the ms Tick Count in the Windows case for the timing.  Because of this, your timing resolution in the model is only 1ms, so you only see the sine value change every 1ms.

 

What's happening is that when you build your VI into an lvmodel, a projected is scripted behind-the-scenes.  Your model VI is put into a template in this project under and built into a .dll.  Because this build is located underneath the "My Computer" target in the tempory scripted project, the wrong case is being used in the DLL.  Unfortunately, since all of this scripting is done behind the scenes, there's no way you can force it to compile correctly.

 

So, in order to force it to compile with the us Tick Count, you need to get rid of the conditional structure.  I compiled and tested this in VeriStand and the model now updates at the correct rate.

 

Devin

Devin K
Systems Engineering - RTT & HIL
Member BSI
Member
BSI
Posts: 187
0 Kudos

Re: Workspace Data Rendering

Devin, you are right ! :smileyvery-happy: It works here as well, at the expected digitizing rate.

Thx.

Laurent

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page