Quantcast
Channel: All LabVIEW posts
Viewing all 203034 articles
Browse latest View live

Re: Nested Right Click Menus

$
0
0

Hi McQuillan,

 

have you tried to create a RTM file with the menu editor available in the LabVIEW IDE? ("Edit" menu -> "Run-Time menu")

 

There you can use 4 arrow buttons to order menu items…


Obtain Properties of Refnum's Referant

$
0
0

Using VI scripting, I'm trying to get a list of properties available from any block diagram terminal of type refnum.

 

The refnum terminal may be obtained from any of A, B, and C below.

Capture.PNG

 

Note that if I have a reference to the property node (marked D in illustration), I can easily get a list of properties available, so one approach would be to drop and wire a temporary property node to A, B, or C. However, I have a list of all available properties and their various flags, and I think it will be quicker to parse the array than to generate all the property info I need programatically.

 

I can get the data type of the terminal as a variant, but I can't seem to convert this into the specific data type of the control that the reference refers to.

Re: How to show all possible errors generated by a given VI

$
0
0

I think if you drop an "error ring" onto your block diagram, you get quite a detailed list of all the errors that LabVIEW can throw.

Re: DRAM not available on cRIO9040

$
0
0

Would you happen to know which cRIOs with FPGAs have access to DRAM (if any)?

Re: Programmatically Launch VI on cRIO

$
0
0

Wow thanks for all this!  Good catch on the error case in StartSeparateServer.vi, I definitely missed that.  So I probed that error, and verified that my ROSNode.vi is in the correct location on the target.  This is the error that occurs when it tries to launch the VI via file path: 

 

Error 1059 occurred at Open VI Reference in StartSeparateServer.vi->CheckNodeName.vi->ROS_Topic_Init.vi:1750001->Subscribe to odom.vi

Possible reason(s):

LabVIEW: (Hex 0x423) Unexpected file type.

VI Path: /home/lvuser/natinst/bin/user.lib/ROS for LabVIEW Software/ROS/Code/NewROS/ROSNode.vi

 

So, the file is on the target in the correct location, but for some reason it thinks it's the wrong file type (even though it's a vi with a .vi extension).  Is there anything I could have accidentally changed in, say, VI properties that would change the file type? What file type does the Open VI Reference expect? 

 

Re: Controlling third party .exe programmatically in LabVIEW

$
0
0

Just for future reference, you should always try what you want to do automatically in a manual fashion first.  In this case, it doesn't seem like you tried to execute the commands from a command line.  That would probably have helped you to solve your issue and you wouldn't have even had to come here.  🙂

Re: DRAM not available on cRIO9040

$
0
0

Hi Gryffin,

 

why don't you call your local NI sales team?

 

I guess those FlexRIO targets support "FPGA with DRAM"…

Messages for this Actor.llb | Community assistance required

$
0
0

In my quest to reduce the amount of "Project Explorer Programming" when using Actor Framework, I've created a tool that will let you insert an AF message when right-clicking a tunnel.

 

Place Actor Message.gif

 

 

 

This works fine. However, there are three issues:

  1. LabVIEW opens a crash report screen when you attempt to close LabVIEW
  2. I couldn't work out how to make the Send VI appear in-line with the tunnel
  3. I'm not sure what references I should be closing, so if someone wants to do a code review and grill me - feel free
     

     

In the spirit of community collaboration here's my GitHub page. If you can solve the issues / want to clean up the code, please feel free! https://github.com/TomsLabVIEWAdventure/Place-Actor-Message-Plugin

 

Attachment is saved in LabVIEW 2009. For install instructions, go here.


Re: error sending command

Re: Packed Library (PPL) Containing Nested XControls

$
0
0

I have been through some of the exact scenarios you have seen. What I ended up determining is that there is no way to do it right and have it be reliable.

 

This is the exact reason I created QControls. I have posted my detailed reasoning here on the LabVIEW Wiki.

 

Short answer is XControls don’t play nice with Libraries or Classes, especially PPLs; and I can’t imagine the level of complexity you get into with nested XControls. 

You can keep hitting your head against the wall here as I had done and you might find a way to get it working. That is until the next time. But I suggest using QControls instead. 

The QControl Toolkit is free on the Tools Network and there are lots of resources out there on how to use them. The best place to start is the QControl Enthusiasts page.

 

I hope this helps. 

Re: Blink function as a SubVI

$
0
0

 wrote:

I'm trying to create a subVI for a blink function as I need an LED to blink at several points, each with different intervals. 


What are "points"? You mean several different LEDs? Does each LED blink forever at the same speed or can they change on demand, or even stop blinking? What is the speed of your toplevel loop where you are calling the VI? It can all be done, but will be a bit clumsy.

Re: Method of Bundling Controls Independent of Front Panel Location

$
0
0

To be fair all these options seem to be unfriendly to the programmer. I fully agree a large cluster that is just set to be invisible is a horrible idea. It seems fairly crazy that there is not a way to decuple the front end from the back end. So far I prefer the last example given although it still is less than ideal. Thank you to everyone who gave examples.

Re: Packed Library (PPL) Containing Nested XControls

$
0
0

Hey there Quentin,

 

Ah yes, QControls ring a bell from past CLA Summits. Given my infrequent use of XControls I sort of filed away QControls in the back of my mind as something I may need someday. Now might be that time, so I'll take a look at your work.

 

Thanks for your input! I'm glad I'm not the only one.

 

Mr. Jim

Re: Method of Bundling Controls Independent of Front Panel Location

$
0
0

You can decouple the business logic from the UI. To do this you need a better architecture. A queued message handler or an actor framework system would allow you to do this. Most of the systems I work on are message based systems that separate the UI fro the actual stuff that does all the work. The UI simply gets updates to display data or sends messages indicating something happened on the front panel. You just need to design the system with those goals in mind.

how to debug shortcut menu plugin?

$
0
0

I'm on my first attempt to make my own shortcut menu plugin.  I started from "Create Shortcut Menu Plug-In From Template.vi" in <Program Files (x86)\National Instruments\LabVIEW 2018\resource\plugins\PopupMenus>

 

On the block diagram of the  "Execute <plugin_name>.vi" , there's this comment: 

You may enable debugging on this VI to help develop your code. Debugging only has to be disabled on the builder VI, not the execute VI.

 

What does this allow me to do?  If I turn on debugging, then utilize the plugin, it doesn't seem to call the source VI in a way that I can debug it.  i.e. probes and execution highlighting do nothing.  It acts similarly to probing the source of a re-entrant VI rather than the clone.  Running the plugin VI on it's own has no debugging value since there's no reference object on which to act.  

 

What am I missing?


Re: Obtain Properties of Refnum's Referant

$
0
0

Turns out dropping a property node is pretty trivial and gives the list of properties. I've attached a snipppet which should work with any refnum terminal.

 

It should be a straightforward exercise to set one of the output terminals to ClassName to get the Class of the control referred to. However, it seems like there should be a straightforward way to get that class name!

 

Get properties from refnum terminal.png

Upgrading LabVIEW 2013 to 2019 on cDAQ-9139

$
0
0

Hello All,

 

We are in the midst of upgrading LabVIEW on our cDAQ-9139 from 2013 SP1 to 2019. 

 

In anticipation of receiving the go-ahead, I have been attempting to install the 2019 evaluation version on the cDAQ computer which is running Windows Embedded 7.  I am getting an NI Package Manager error message:

 

"You need at least Windows 7 Service Pack 1 to install NI Package Manager."

 

Microsoft's support for Windows 7 has since been dropped and windows update does not give me the option of installing service pack 1.  I cannot seem to find a suitable download source. 

 

Has anyone overcome this issue? 

Is it even advisable to upgrade to SP1 on the cDAQ-9139?

 

Thanks & Cheers,

 

- Jeff

Noise Reduction

$
0
0

I'm using  a cDAQ-9174 and NI 9237 powered by a NI PS-15 power supply to take pressure measurements. There is significant noise in all of my pressure measurements, including in slots that are not plugged in (red and yellow lines in "block" attachment). The "zero pressure" attachment shows what the DAQ is reading at zero pressure. Is there a filter built into LabVIEW that I can use to smooth out my signal?

Re: Noise Reduction

$
0
0

There are some filters in the "Signal Processing" palette that you can use. I don't think they work on dynamic data though, so you'll have to either convert your data or just use regular DAQmx functions (Help -> Find Examples, there are lots of good ones).

 

Unconnected lines are always going to be noisy as there is nothing specifically setting the voltage to any value, so it'll just bounce all over the place.

N9342C Spectrum Analyzer

$
0
0

I am currently working on my senior project where I am tasked with automating VSWR measurments on a N9342C Handheld spectrum analyzer. I am entirely new to labview and communicating with instruments using coding in general. I am running into an issue with one of the block functions in my code.When I run the code it passes through the "configure trace type.vi" where I recieve the error:

error code: -1074000000

Agilent N934X Series.lvlib:Error Query.vi<ERR>
Instrument reports:
-113,"Undefined header;:TRAC1:MODE<Err> WRIT;:FORM ASC;"
+0,"No error"

 

<b>Complete call chain:</b>
Agilent N934X Series.lvlib:Error Query.vi
Agilent N934X Series.lvlib:Configure Trace Type.vi
Untitled 2.vi

I downloaded the instrument driver where this block came from straight from the keysight website and am basing my current code off of a provided example program.

Attached is an image of my current code, which still needs to be improved to get the desired output.Capture.PNGCapture 3.PNG

Viewing all 203034 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>