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

Re: Implementing API function with HWND

$
0
0

Per https://msdn.microsoft.com/en-us/library/windows/desktop/aa383751(v=vs.85).aspx:

 

HWND is a Windows type for a handle to a window. It's declared with

typedef HANDLE HWND;

so it's the same thing as type HANDLE, which is a handle to an object; it's declared with

typedef PVOID HANDLE;

so it's the same thing as a PVOID, which is a pointer to any type, declared with

typedef void *PVOID;

So a HWND is essentially a pointer. Whether it's 32- or 64-bit depends on the flavor of Windows that you're using. The documentation for your API should give more details on what window's handle you'd pass into this function.


Re: Function recognition

$
0
0

tomek.ukf wrote:

I'm new here so Hi to everyone ! Smiley Happy 

I'm new with LabVIew also, so sorry for probably  "stupid question". 

Could you help me recognite this function with "house" ? From what I found out this function is letting us to choose from every "icon" which was used in blockdigram and then i can use it string representation. I found this blockdigram in old computer and i want to use this "function" in my raport. 

Thank you ! 

 

 


Wow - talk about stumbling out of the starting blocks!  Please review the LabVIEW Training resources listed on the main LabVIEW forum page.  This is (usually) terrible coding practice, and if you are wondering what that function is, you aren't advanced enough to make use of it in an appropriate way.

 

Edit:

I'm sorry, that sounded kind of nasty.  I didn't mean it to sound so cruel.  Smiley Sad

Re: Function recognition

$
0
0

That is a "Local Variable" they can be found on the Structures palette.  But probably should not be used the way you are describing.  The naming convention alone gives us clues that the code is not designed in a robust manner with a proper state machine to enforce system state information.

 

Number to Decimal String will only return the integer portion of the floating point values.  Use "Number to Fractional String" instead

Re: Need help with Strip Chart

$
0
0

Expanding slightly on Ravensfan's (and my) answer(s), if you set (via a Property Node) the XScale Minimum to be Now (from TimeStamp) and Maximum to be Now + 100 (seconds), your X Scale can be in Absolute Time, and the width will be 100 (seconds).

 

Bob Schor

Re: How to connect a 1D numeric array to case structure selector?

$
0
0

Tim, I think you can combine your two FOR loops into one. (while it creates slightly more work, I don't think it'll make a noticeable difference). Is the "array 3" output even neened?

 

PickErrorPins.png

 

I would even go as for as creating a 1D U8 array lookup table and do the formatting of the string conditionally. Less typing of near identical strings, thus less places where typos can hide. Smiley Very Happy

 

PickErrorPinsB.png

Re: Execute event when boolean value changes

$
0
0

Read what Jeff wrote, do what he said (especially about Reading), and think clearly about what you want to do (without worrying too much about how to do it).

 

If you want to explore the "hows", become a Scientist.  Do an Experiment -- write a very tiny VI that has, say, three Boolean Controls, a Push Button, a Stop button, and an OK Button.  Make three indicators -- Pushed?, Stopped?, and OK?.  Drop a While Loop, put in an Event Structure, and make three Events, Push Button Change, Stop Change, and OK Change.  Put the respective control in each Event Case and wire it to its Indicator.  Also wire Stop to the While Loop's Stop indicator.

 

Now run it and play with it.  If things happen too fast, turn on Highlight Execution (the light-bulb, the fifth icon on the Block Diagram Icon bar) and run it again.  Learn.

 

Bob Schor

Re: How to connect a 1D numeric array to case structure selector?

$
0
0

altenbach wrote:

Tim, I think you can combine your two FOR loops into one. (while it creates slightly more work, I don't think it'll make a noticeable difference).

 


Nice call.  But let's go slight further: no Index Array is needed

 

 


altenbach wrote:I would even go as for as creating a 1D U8 array lookup table and do the formatting of the string conditionally. Less typing of near identical strings, thus less places where typos can hide. Smiley Very Happy

I was thinking that originally, but then found there there a bunch of empty strings used as if they were "do not care".

Re: delayed synchronized AO from AI

$
0
0

Patrick,

I am posting a screen capture of what my vi is doing.  The yellow channel is the input analog signal.   The blue channel is a trigger when the analog input is generated.  The green channel is the analog output trigger, and the purple channel is the delayed AO of the input signal.


read text from pdf

$
0
0

Hi,

I am trying to extract some text form a pdf file. Attached is a file and a library. in Labwiew 2012, it works a bit until a get error 1172 (below). How do I solve this?

in labview 2014, I get the error 1386 (just at the beginning). How do I solve both cases?

Thank you,

Error 1172

 

Error calling method org.pdfbox.util.PDFTextStripper.getText, (System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

Inner Exception: System.NullReferenceException: Object reference not set to an instance of an object.) <append><b>System.NullReferenceException</b> in pdfExtract.vi

 

Re: Producer/Consumer loop data display problem

$
0
0

Croosrulz,

 

Thank you for the suggestions. I did what you suggested and the vi works much better. I didn't know the index array could be expanded. It is much easier and neater to work with it like that. Combining the DAQmx tasks into one task made the vi work much faster.  I will move the data write to the consumer loop. I have seen this approach in other examples. I left it in the producer loop only because the code was working.

 

Thank you,

 

Chris

 

Re: Producer/Consumer loop data display problem

$
0
0

Bob,

 

Thank you for the explanation on timing between the loops. I figured since they were different loops one can be run slower than the other. I understand it is better to let the producer control the speed and have the consumer loop follow.

 

I would like a timer on the front panel for the user to see how long the process is running. I can put this in a separate loop.

 

Thank you,

 

Chris

Re: Producer/Consumer loop data display problem

$
0
0

Bill,

 

I like this concept and was tried this approach earlier with no luck. If I add a timer with a case or event structure in the consumer loop to only display the data every x seconds would it also impact the dequeuer?

 

Thank you,

 

Chris

Re: Producer/Consumer loop data display problem

$
0
0

ChrisH76 wrote:

If I add a timer with a case or event structure in the consumer loop to only display the data every x seconds would it also impact the dequeuer?


Not with the Elapsed Time.  It has no waits in it: just checks the time and sets a Boolean output if X seconds have passed.  Just wire this output to the case structure.

Re: Trouble using MT Modulate QAM vi

Re: CSV database


Re: read text from pdf

$
0
0

Your assembly targets an old version of the CLR

2018-01-09 10_33_44-Win7x64 NI2016 - VMware Workstation.png

You actually have two different problems:

  • Your issue in LabVIEW 2012 is something inside the assembly, perhaps the way it is being used or an internal defect. I haven't investigated the assembly yet but perhaps you can try looking through the providers manual / or request help from them.
  • Your issue in LabVIEW 2014 is different - basically the assembly is too old to be loaded in 2014 without forcing LabVIEW to use the old CLR (via config file). The same sort of issue is described here and you can try working through the solutions proposed. If you do get it working it is likely you will then hit your first problem above.

Increment data collection

$
0
0

Looking to collect data and index with a button push.  Here's what i have so far, the counter increments and saves the data for the last data point only.  What am i missing?  I'd like to send this excel and show 16 data points, column A is the index (count) and column B is the data captured at each button push.

 

 

 Counter.JPG

 

 

 

Re: Increment data collection

$
0
0

I cannot tell from the picture, but make sure "append to file" is set to "true" on the write spreadsheet function.

 

You can look into an event structure to have your code respond at the press of the button.

Re: Change LabVIEW Registered Owner and Company

$
0
0

NicLinley wrote:

Ok, NI support helped me out on this one.  Updating the .ini file from within C:\ProgramData\ ... fixed the splash screen and also now when I create a new build my company name is auto-populated in the Version info.  Thanks, NI!

 


1) Navigate to C:\ ProgramData  
2) This folder is hidden and you must select Tools » Folder Options » View » Under ‘Files and Folders » ‘Hidden files and folders’ » check the ‘Show hidden files, folders, or drives » Select ‘ok’
3) Open ProgramData » National Instruments » LVProductDLLInfo » 12.0.0 » LabVIEW_ADE_120000.ini
4) Change the RegisteredOrganization = ‘xxxxxxx’ to the appropriate organization
5) Change the RegisteredOwner = ‘xxxxxxx’ to the appropriate owner

This will change the LabVIEW splash screen to the appropriate settings.





Thank you!

Re: Extract User Specified Subset of Signal from Waveform Chart

$
0
0

agin,

 

Thank you for attaching your code, it's always a lot easier to go through code than several screenshots. 

 

You said in your description that the minimum value that you wanted to feed into Begin Offset was not correct. Could you clarify what you saw when you ran the program vs. what you were expecting to see?

Viewing all 203364 articles
Browse latest View live


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