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

Re: MGI Panel Manager Persistent Window Position Race Condition

$
0
0

Actually, it would make more sense for you to make the GPM page more visible (on your own site). I didn't know about that either. Sounds interesting.

 

I've spent years not liking VIPM because of the global installs (even if per LabVIEW version), breaking older projects, and transporting the code to other machines just to find missing dependencies. What a hassle.

 

So I just unzip the .vipm files and add the content directly into my projects. Sounds like that's exactly what GPM does for a living. I'll have a look. Thanks for the tip.


Re: Sine wave generating using formula

$
0
0

I get the feeling that this all could be done with <20% of the current code. Can you attach your VI once more, but having typical default values in all controls so we can run it without having to guess. (Change all controls to reasonable values, select them all, edit..make current values default, save VI, attach it once more).

 

(Some controls seem to contain derived values most of the time. Shouldn't these be indicators instead? Some of your algorithm choices are weird. Why is the inner loop running more and more times, repeating calculations that have been done already earlier (unless controls change. Why is there no way to stop the outer loop? [sec] is not a frequency unit. And no, it does not start slighly before start delay. The point is exactly at the start. You see the linear interpolation where there are no points. That's fake.)

Re: MGI Panel Manager Persistent Window Position Race Condition

$
0
0

Oh yeah dude if you normally move the VIPM code into your project manually, you will LOVE GPM!!

Re: CLAD Preparation guide questions

$
0
0

Hello,

 

I have an additional question. I agree that the while loop runs two times. I dont understand why it will have two rows (it just has one channel) and isnt the value of "data" updated only after the loop ends, i.e. only the last loop iteration value would be passed on it ?

 

Thank you,

Number array to boolean array

$
0
0

I have a 1D array of 16 bit integers (they are all 0 or 1's).  I would like to convert it to boolean array but when I try to use num to array function a broken wire appears:

 

RFeng_0-1589394072723.png

 

Re: Install LabView 2019 on hard drive other than C:

$
0
0

The link is broken. What is the new link?

Re: Number array to boolean array

$
0
0

Hi RFeng, I think that function you are attempting to use is for converting 1 numeric (not an array) to its binary representation. You can just use the "not equal to zero" function to convert your numbers into booleans.

Re: Number array to boolean array

$
0
0

It looks like you are using the Number to Boolean Array primitive.  This converts a *single* number to an array of Booleans.  One way of converting an array of integers to an array of Booleans is to just pass it to the Greater Than 0? primitive.  Any value in the input array that is greater than zero then results in a TRUE value in the output array.


Cluster of Arrays/Auto Update String Values - BUG - Need Method to Fix

$
0
0

System: Windows 10, 64bit, LV2018

 

Problem (See attached gif), Screenshot of code snippets

 

I have what I call an "Action Engine" that provides a simple UI to create cycle sequences for a number of devices (steppers, relays, solenoids, etc.)

 

There are "Device" field and "Action" fields involved in this front end procedure.

 

When the user selects the device, I parse a list of actions related to that device and write the array of strings to the dropdown selector (so that they don't have the option to select the wrong action for that device - in this case, it would just go to the default for that device.

 

I'm about 60% there - when moving linearly through the sequence programming (step 1, step 2, etc.), it works just fine. I'm using an event structure to update the fields on the user 'Mouse Down' and 'Value Change' events. I grab the coordinates (after a bunch of searching I actually found this method and modded to my needs - sorry, couldn't relocate to throw creds) then parse the list based on alphabetical characters, build the new array, and write it to the action control dropdown. -- See code snippet.

 

The problem happens when the user wants to change an "action" out of order. The array of strings from the last selected device appears. (It actually then populates with the correct values and displays the second time the user clicks it, but that's not good enough for retail) I've tried various things including 'on hover' and such. Please help. Thanks.

 

(PS: I understand why it doesn't work - the action dropdown is populated with the array of strings from the last selected device. Just now sure how to fix it....?)

 

"Fix it" - Populate the dropdown with the correct device actions before it displays, not after the second time the user clicks.

 

Re: Occurrences (on FPGA) with Timeout = 0

$
0
0

For messaging between loops, I recommend handshake items, see https://zone.ni.com/reference/en-XX/help/371599P-01/lvfpgaconcepts/fpga_storing_reentrant/.  They are supported in SCTLs.

 

One thing we do sometimes to keep a loop running but not doing anything is adding an Idle state where it is checking for a message or some kind of change to change to another state.

 

I would recommend registers over occurrences.  If you find yourself needing to go back and forth between two loops, handshake items help with that (e.g. you can read without acknowledge and then acknowledge later on when you want the writer to continue).

Re: Write to txt file with constant tab size

$
0
0

 wrote:

Change your file extension from .txt to .tdl.


I have never had to do that.  Excel opens up txt files for me with no issues.  I do it all the time.

Re: CLAD Preparation guide questions

$
0
0

 wrote:

I have an additional question. I agree that the while loop runs two times. I dont understand why it will have two rows (it just has one channel) and isnt the value of "data" updated only after the loop ends, i.e. only the last loop iteration value would be passed on it ?


The autoindexing output tunnel increases the number of dimensions by 1.  In this case, each row will be a single capture (each capture has several samples) for the channel.  And the update doesn't happen until after the loop due to Data Flow (the loop has to stop before the data going out of the tunnel will be available).

Re: Write to txt file with constant tab size

$
0
0

Thank you for your fast reply.

 


 wrote:

So a format code of %-16s would take any string up to 16 characters.  Any missing characters would be filled with spaces.  So "Force" would be followed by 11 spaces.


 

I implemented this. I know the maximum possible digits for each parameter. Using this method I am able to reserve for every parameter the maximum needed space.

 

Thanks!

Re: Write to txt file with constant tab size

$
0
0

@BertMcMahan, Thanks for your reply,

 

I implemented this and it works indeed, so it is definitely a possible solution to the problem.

However, I like the constant tab space as suggested by slightly more.

 

Thank you for your suggestion!

Re: Alicat Error 1073807339 VISA Read


Update a field in the database record pointed to by the cursor

$
0
0

I am modifying the database example Database Fetching VI: labview\examples\database and I would like to Update a field in the record pointed to by the cursor. The problem is that the UPDATE VI operates on the entire table using a "Connection Reference" but the NEXT and GET VIs use a "Recordset Reference."

 

Is there a way to update the record pointed to by the cursor, or do I have to use the UPDATE WHERE system?

Re: Application Builder stuck on "Building Application..."

$
0
0

I am also experiencing a similar issue working in LV2016.  I wouldn't say that it is due to file sizes.  I can build the exe to a local folder and the built app is <5Mb in size.  If I try to build to a network location, the build never completes and the build status is stuck at "Building application..."

 

I can build an application from a different project in LV2016 to the network so I don't suspect the network is entirely the issue.  I build LabVIEW apps to a network folder all the time.

 

The problem project has some lvlibs and xctl's in it.  If anyone has an idea of what to look for, I'm nearing my wit's end too.

Re: Problem in reading binary files

$
0
0

Hi crossrulz,

 

Yes I was able to solve it by forcing prepend to true. But with TDMS file I am running into memory errors with bigger fetch sizes in Ni Scope

Re: LabVIEW HTTP Client API VIs does't return the 101 code

$
0
0

Error 363529 = "LabVIEW: The server closed the connection prematurely."

 

That sounds like LabVIEW never reached the Server. Maybe some sort of firewall setting is blocking access to the Server?

 

I can't see the details in your VI because I use LabVIEW 2016.

 

 

Agilent 33220A error in burst mode

$
0
0

Hello everone,

 

I am running into the following error running Agilent 33220A in burst mode. I am suprirised the VI is working well until input frequency is 6 MHz, If I go beyond 6 MHz, I am getting this error.

Please help. My VI is also attahced

 

Agilent error-LV.png

 Agle

Viewing all 201982 articles
Browse latest View live


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