Quantcast
Channel: LabVIEW topics
Viewing all 67383 articles
Browse latest View live

Did LVMerge disable my events?

$
0
0

I'm having some really weird bugs recently.   I have a big program (>1000 vi's), that is continuously being evolved with new features. 

Some parts haven't changed for half a year, and suddenly some buttons stopped working.  

 

The code is there, but somehow the 'value changed' event simply doesn't fire.    

The solution was to edit the event,  and remove the event source.   Then afterwards, add the exact same event source...    and then it work again.    Although the code is exactly the same!

 

Is this at all possbile??    This is code that hasn't been touched for half a year!

 

I have the strong feeling that this behaviour is caused by LVMerge...  it doesn't seem to like my (rather big) main program, and has been messing up things a lot.   But so far, at least all issues were visibile.  (Missing wires, double vi;s, etc etc...)    It's getting extremely troublesome when it can create invisible bugs... 

 

Does this sound familiar to anyone?

 

 

 

 


Can I monitor the status of the serial flow control

$
0
0

I have a complex byte error tester written in LV.  It works great but in one mode of testing a unit, the throughput falls off severely.  Is there a way to see if the UUT is exerting a flow control in real time?  Yes, I have flow control enabled, I just would like to be able to see if that is what is slowing down the transfers.

Sending multiple data with TCP in labview

$
0
0

I have some data written down on a labview of a PC (like a person's name, surname, age......) and using the TCP connection I'd like to send it over to another labview. I've made identical interfaces in both, where I want to display all the details in the corresponding strings/numbers. How can I do that? I can send one data string, but more than one I don't know, and in a way that it's displayed in the same way...I've tried using concatenate string and sending that but it doesn't work either. 

cDAQ Frequency

$
0
0

Hey LabVIEW community.  I'm working on trying to read Frequency.  However, my results don't necessarily make sense to me and maybe there's something I am missing.  I am using NI 9421 as my DI and its max Clock Rate is 10 kHz.  But I am using onboard counter.  I have posted a FP displaying results with the settings and a BD of the of the code (FYI: made it from frequency example).  Also attached the code.  My results surprass 10 kHz.  Am I not understanding something?  I plan to use a faster DI module cuz I believe I need minimum 100 kHz.  Also, the DO is NI 9472.  Am I just reading noise?  VI is in 2014

Tektronix DPO 2000/4000 Wait for trigger?

$
0
0

Hello,  I am using the scope mentioned in the title and I am trying to figure out how to get the device to wait for a trigger.  I had been using a TDS model that had a wait for trigger vi, so I could just put that in a loop, but with this model, I am having no such luck with this.

 

I have configured the edge trigger and then I just put the read vi in a for loop (twice).  However, I get one waveform and then the VI continues to run without acquiring a second image.

 

Thank you for any help.

U32 + "digits of precision" (??)

$
0
0

Hello,

 

What the meaning of this behavior ?
Is this an expected behavior ? and, if so, why ?


I asked this question previously on the french forum (french is my mother tongue) .. here .. but I didn't get any answers.

 


xxx19.png

 

For a U32 (the same for a I32, U16, I16 ...), is it normal to be able to set the "digits of precision" ? (for me, that makes no sense)
Moreover, this can cause display errors (79,99999 .. )

 

xxxxx.png

 

What is your view of that ?

Thank you all (and sorry for my poor english)

 

How Fast are cRIO Inputs Updated?

$
0
0

I am using a cRIO for the first time (cRIO-9063) with 4 modules: 9375, 9213, 9205, and 9208.

 

The module I am concerned with now is the 9208. I want to read its analog inputs periodically (say 100ms) and add it to a running average. So I have a VI running on the PC that gets the value at 10 of its analog inputs every 100ms, but I seem to be getting duplicate values, which makes me think that the scan engine has not updated yet.

 

My scan period is 10ms and network publishing period is 100ms, so I am unsure why I am getting any duplicate values. Can you explain how I should set this up so that a new value gets updated at least every 100ms? Are there other settings I should be looking at? Thanks!

Question about LabVIEW DLL support and Unicode

$
0
0

Hello,

 

I have a question about LabVIEW and DLL function calls.

I am using a DLL (sorry, I cannot share it) that was written in C. It was written to support Unicode and non-Unicode function calls.

If the Unicode function is valid then FunctionNameW is called, otherwise FunctionNameA is called.

 

I am building some VI's to access the library. I have the regular FunctionNameA functions working.

My question is, does LabVIEW support the FunctionNameW Unicode function versions, and if so is it even necessary if LabVIEW already works with the standard function call?

Am I being redundant or do I need to build in Unicode support?

 

The first time I tried to test the Unicode functions I got an error, and I am guessing this is a system setting.

 

Thank you for your time in advance.


[FPGA] - NI 9503 - Motor Stepping without NI Motion

$
0
0

I know there is a way to step motors without the premium package with NI Motion / NI Softmotion in order to step a motor linearly using the NI 9503 / NI 9501. We have tried energizing the motor sequentially for our Bipolar Motor with a delay time between each coil trig, however it only jitters. Is there an example VI out there as I cannot seem to get access to my examples for the compact RIO.

Sub-panel Events

Get System Directory - User Application Data question

$
0
0

When I use Get System Directory with the User Application Data folder type, I get C:\<user>\AppData\Local. What I'm wanting is to get C:\<user>\AppData\Roaming.

Use case here is that I want to check whether the user has saved SVN authentication data in "Roaming\Subversion\auth".

 

I can strip path and replace Local with Roaming but I'm a bit worried that I'm throwing away some of the goodness that Get System Directory is giving me if I do so.

 

I'm hoping I'm missing something simple. Otherwise, I might put in an Idea Exchange to have Get System Directory only drop me into the C:\<user>\AppData directory instead of C:\<user>\AppData\Local.

 

Anybody have any better ideas or workarounds for this? 

 

EDIT: My actual SVN issue I have a workaround for. I'm still curious about the Get System Directory behavior. For my SVN issue, I can just command line a --non-interactive and then parse the error string if authentication fails.

How to plot plane using 3D surface plot with equation for the plane

$
0
0

I have a set of data, that I have calculated the best-fit plane for. I have the equation of the plane in the form of Ax + By +Cz = D. However, I am having difficulty getting the plot correct. I have attached pictures showing the relevant portion of my block diagram. In the inner most for loop, I have the equation solved for z, as in z = (D - Ax - By) / C.

 

I have each for loop running from -50 to 50 with a step size of 1. These define my x and y vectors. My z matrix is defined by the plane equation, solved for z in the inner most loop.

 

This works for some data sets, but not all. For example, it works for when the plane equation is:

 

0.0229x + 0.7305y + 0.6825z = 48.9015

 

But not when the equation is:

 

0.5373x + 0.4914y + 0.6855z = 49.5302

 

I have tested my calculations in MATLAB, and the plane plots correctly, so I know that the equation itself is correct. But I do not have to create a z matrix based on x and y vectors in order to plot a plane in MATLAB. I can plot straight from the equation and boundary parameters. So what am I doing wrong in my setup for the plot in LabVIEW?

 

Relevant portion of my block diagram:

Block Diagram.PNG

Plot from first equation example, where it plots correctly.

Correct2 0-45.PNG

 

Plot from second example, where it plots incorrectly:

Incorrect plot 45-45.PNG

 

Unable to use my GPIB device with labview

$
0
0

Hi All,

 

I successfully installed my GPIB card but now i am facing another issue. When i try to import the device recognised by Visia (picture 1) it doens't appear.

 

My device is a tektroniks function generator. I barely need 2 functions: Changing Frequence, kind of wave and amplitude. Any help will be appreciated.

 

Regards

Obtaining Pre-scaled Units from already generated DAQmx Task

$
0
0

Hello,

 

I'm working on developing a tester that uses MAX scales for it's signal calibration. When the operator is using the tester he only needs access to the scaled (calibrated) measurement coming from DAQmx, so the scale is input into the task at start.  When the calibration tech is working with the station I'd like to provide the prescaled units to him so that he can compare with the transfer standard he's working with. Now I know I could do this by canceling the already running task and rebooting into a new one that doesn't use the scale, but I'd think that accessing the raw measurements (mA or V) from a task that uses a scale (mBAR or inch/lbs for instance) on the fly SHOULD be possible (not to mention awesome). I just haven't figured out how to do it yet. Anyone have any ideas?  I've found an old thread from 2008 that was discussing the 'create a new task' method mentioned above, nothing in regards to this however.  

 

Thanks!

 

Tim

A way to address a cluster's typedef programatically

$
0
0

I have a need to extract the labeltext attached to a parent typedef of various front panel clusters. Unfortunately strict type defs don't strictly enforce labeltext for referenced controls. Is there a way to use a front panel control/cluster reference to address the parent typedef programatically? Or is there a way to extract the original/typedef labeltext programatically for a given front panel cluster/control?


Preventing an action engine from being called by other threads for a short period of time

$
0
0

So, I coded myself in to a corner because I didn't think things all the way through... and I'm looking for ideas to escape that doesn't involve a big rewrite Smiley Happy

 

I have an action engine that acts as a library. Other threads access that library to control hardware. I then wrote a VI that will read a CSV file and completely change out the library to new entries / values that can be done on the fly.  The design of this was so that I could have a single name (or in this case a whole bunch of single names) be mapped to different hardware IO channels depending on what was needed for the test.

 

My problem:  This VI that loads the library file works something like this:

  1. Load file in to memory.
  2. Call AE, command "Clear"
  3. Parse library data in to proper format (IO channel, type, warning limits, etc) and build new library array
  4. For each element in array
    1. Call AE, command "Add channel"
    2. Call AE, command "Update properties"

 

The problem just occorred to me (and should have much earlier Smiley Mad) that during the time between the "Clear" command and the completion of the parsing / for loop if any other section of code requests a value it will return an error.  This obviously is problematic. I strongly suspect that I'm going to need to just rework the AE and add a single command "Load Library", but that will be a pain.   The simplest solution I have been able to come up with:

 

  1. Make the AE run on a queue. When called the "Command" and "Data" variant gets enqueued. AE stops executing when queue is clear
  2. Add my "Load library file" directly in to the AE as a new command. Each AE call can then just become an enqueued element.

The biggest problem I have with this is the added overhead of the queue.  Since this is in line with the loop doing the control, I'm being stingy and don't want to give up those few extra microseconds that would be associated with every call.

 

 

So, after that long rambling intro... my question:  Can anyone think of a simple way to either "reserve" the AE to a single thread during this loading, or to update it without adding extra overhead?

 

receiving multiple messages from multiple loops in event structure

$
0
0

Hey guys,

 

I have two questions really, first, whats the best way to receive messages in the event structure? I've been looking at user events, and that seems like a good option if I only ever want to send a single message. Ive never found an example where the regester for events has a second event its looking for. I currently use queues from the event structure to my other loops.

 

My second question is do I even want to send messages to the event structure, my current thinking is that it would make things easier to follow if the event structure dispatched all the messages to individual loops. Is is more appropriate to just have one loop talk directly to another through the queues already in place?

 

Im thinking ill set up an user event for handlng errors but im not sure about the other messages.

 

Thanks guys

How to clone remote cdaq-9132

$
0
0

Hi,

 

I have a cdaq at a remote location which I can connect to How would I remotely clone the system on to a cdaq here?

 

 

regards

 

Simon

Typedef Control Name From Variant Data - Value Change Event

$
0
0

In the attached example, I'm having trouble figuring out why the references Traverse G - objects.vi returns for typedefs do not have the control name embedded in variant data when they are registered for Value Changed Events (enabled diagram).  It seems to work fine for controls that are not typdefs.  If I explicitly find the controls using VI panel properties (disabled diagram), everything works fine but I have situations where the traverse Gobjects would be preferred since it can go through nested tabs / controls etc.  Am I missing something simple?

 

Note crossposted at LavaG post

Silver XY Graph- Legend positioning when compiled

$
0
0

I have a compiled and isntalled utility that is deployed to around 15 computers so far. One user (and only one so far) is having a problem with the XY graph legend shifting down. It normally looks like this:

Normal.png

 

Her's looks like this (I did this myself since I don't have a screenshot).

Bizarre.png

 

This problem has persisted across multiple builds, and her install is the only one exhibiting this odd behavior. All other computers and development scales fine and looks good.

 

There is one piece of code that may pertain to this. I have a resize event on pane 3 (the XY graph pane), but I'm not sure this could cause this problem.

Resize code.png

 

Any ideas?

Viewing all 67383 articles
Browse latest View live


Latest Images

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