SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

Running a VI in Signal Express using compact DAQ

Hi,
 
I have the following question.  I have a compactDAQ system and SignalExpress v 2.0 and I am trying to do two things.  1st I want to output a variable PWM signal and second I want to Acquire sensor inputs while this varible PWM is output through my compactDAQ system.  I figured that I could do this by using the option to run a VI so I made a VI that varies a PWM out of the compactDAQ system and I will add other steps to acquire the data I need will this work or do you have any suggestions/ ideas on how to accomplish this?
 
Also,  I am curious to know if i can Power my Compact Daq chassis with 12 V DC automotive powerport.  The Chassis states that I can supply 11-30V DC are there any downfalls to running it off the 12Vdc Automotive voltage?
 
Thanks
Chris
0 Kudos
Message 1 of 7
(7,319 Views)

Okay I made a VI that does exactly what I want to do now, however I cannot add it as a step in signal express.  When i try to add this as  a step it says failure opening vi.  Attached is the VI how do I run it in signal express?

 

0 Kudos
Message 2 of 7
(7,301 Views)
Hi Chris,
 
I took a look at your VI and converted it to use the SignalExpress User Step template. Because SignalExpress uses the LabVIEW RunTime Engine to run the VIs, some extra steps have to be done when the VI you are calling includes subVIs. These extra steps/instructions can be found at: Creating SignalExpress Plug-Ins with LabVIEW. An overview will tell you that 1) you need to create an LLB which contains ALL the subVIs that you are using, 2) The main VI should be re-entrant, 3) all control and indicators should be on the connector pane. There is also a section that talks about being careful of While Loops and other things.
 
For now, i went ahead and did all that for you and I'm including that LLB (written in LabVIEW 8.0) that should hopefully do the job. Feel free to modify it, but if you add more subVIs, you'll have to rebuild the LLB (just a warning). So when in SignalExpress, select "Run LabVIEW VI 8.0" and select the top-level VI in the LLB which I called "PulseWidth.vi". I didn't have a chance to try it (sorry).
 
By the way, the User Step template can usually be found at: C:\Program Files\National Instruments\SignalExpress\User Step Templates
 
I hope this helps... Good luck.
Phil
 
0 Kudos
Message 3 of 7
(7,296 Views)
Phil
 
Now it in fact works in signal express, however,  I cannot get it to do what I want it to.  I want the program to continue to run continuously until I command it to do otherwise, however, I noticed that Signal Express doesn't like that.  Is there anyway i can make this program into an executable and still run signal express with the same compact DAQ system and modules simultaneously?
0 Kudos
Message 4 of 7
(7,282 Views)
That's interesting. So you're pressing the "Run" button (which should make SignalExpress run the step over and over until you press the Stop button), and SignalExpress doesn't like that? Could you explain what you mean by "doesn't like that".
 
I'm uncertain about the other part of your question...
 
Phil
 
0 Kudos
Message 5 of 7
(7,277 Views)

It does run it over and over, however, instead of outputing a continuous pulse train when the step executes again, it skips pulses and rexecutes everytime it "resteps."  Also in the program there is a shift register in the while loop but since the loop is never executed twice only the 50% duty cycle is loaded it does not update the duty cycle based on the voltage read in.  I fixed that however but now signal express wont stop.  Any Ideas?  I figured that maybe I could do this without signal express using an executable but I need the other inputs on the modules for signal express.  You think this is a good Idea?

 

Thanks for your help Phil

Chris

 

 

0 Kudos
Message 6 of 7
(7,275 Views)
Chris, it's my pleasure.
 
Here's where I think I made a mistake: Inside the Run case of that VI, I connected the input of the Shift Register on the While Loop. I was using the while loop as a way to hold the state/new duty cycle, but by wiring it's input, I completely defied the point. I believe that if you modify the VI I sent you with the modification in the included image, then it should work like you want in SignalExpress. The changes basically do: if we're configuring, the it's the first time we're running so use the Duty Cycle from the input control, otherwise, read the value from the Shift Register.
 
Because we're using the template here, While Loops can only be used to store state information, which means that you cannot (should not) allow that loop to run multiple times. So a TRUE is always wired to the exit condition of the While Loop.
 
Let me know if that wasn't clear, otherwise I hope that helps!
Phil
 
 
 
0 Kudos
Message 7 of 7
(7,272 Views)