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

How to find the Nth lowest local maximum?

$
0
0

I have a sine wave that is being inputted. The amplitude values are being saved in a 1D array. What I want to do is find the lowest maximum peak of the wave. What I'm thinking is starting at element zero check for the highest value, until a zero crossing, and then when a zero crossing is detected save the highest point. At the next zero crossing save the highest point again and compare that highest peak to the previous one. Save the lowest one and repeat for the number of cycles that have been inputted. I'm wondering if that is the easiest way to do it, or if there is some built in features I haven't been able to find that will make it easier to accomplish.


Voltage Ramp Up and Down

$
0
0

I am very new to labview and trying to generate a ramp signal (ramp up from -3v to +3v for 520 steps and +3v to -3 voltage for another 20 steps). I want this ramp to be in a loop. I have already generate the ramp up and down separately in labview. I just have no idea how to put together into a continuous ramp and adding the loop. Can anyone help? Any suggestion would be appreciated!

Re: Unable to configure Xilinx IP block

$
0
0

I have 14.7 and 2013.4 installed, which match up with LabView 2014 SP1.  From that table, it looks like I can't just install an upgraded version of the Xilinx tools to fix this.

Re: Unable to configure Xilinx IP block

$
0
0

You're right. I would post to the Xilinx forums since I did another search and this error comes up in multiple versions of Xilinx. And in almost every case, corrective action was filed on Xilinx's part, so this definitely seems to be a Xilinx error rather than that of LabVIEW.

Re: Waveform chart memory grows while using "clear chart"

$
0
0

 I was not around here when this thread was active but I would like to offer another explanation...

 

"Un-do".

 

The und-do operation requires storing what was displayed in order to perform and "un-do".

 

Ben

Re: cummulative sum elements in array(one by one)

$
0
0

logatto wrote:

Hi, it was indeed easier than expected, I was taking it in the wrong direction.

 

I am sorry for having annoyed you with my vague question. Even if did not get the point of my single "m".

 

BR.


In my book you are OK!

 

You see this forum is all about LabVIEW and (aside from spelling LV correctly with the last four letters being capital letters) proper spelling and syntax simply does not matter. But be aware that if your wires are not straight and are running backwards, then you are in for a world of hurt!

 

So there!

Smiley Tongue

 

Ben

 

 

It was news to me that summ was spelled with two 'm"s but it makes sense since summary has two "m"s.

 

 

 

Re: Question about run 2 state machine dependently. Attached VI and picture. Thank you.

$
0
0

oh, it works. I do think I tried this....... but how comes it was not working. Thank you again for your help.

Re: how to make 2 state machines run dependently ?

$
0
0

Thank you sir, it's working now! 


Re: Data Recording Freezes When Value Reaches Zero

$
0
0

Thank for your reply. I missed the while loop around the whole thing in the snippet I will attach the file itself. That pb is barometric in inches mercury and it's usually a value around 29. All other pressures are inches water and they vary from 0-5. After you mentioned that I started going through the equations again and realized it's used in the sub vi titled nozzle coefficient to find a Reynolds number and there is a division by Reynolds for the discharge coefficient. That must be where the problem, is there anything I can do to get by that? Thanks again for your help it is much appreciated!

Programmatically Configuring I/O C Series Modules

$
0
0

Hello all

 

I am using a cRIO controller (cRIO 9063) with two c Series modules for voltage I/O (NI-9263 and NI-9205). I am trying to implement a way to configure different aspects of the setup (like range, output amplitude, etc.). I am using FPGA interface mode. If anyone can point me in the right direction I would appreciate it. Thanks

Re: "Enable SSE2 optimination" checkbox is missing

$
0
0

HRSmith wrote:

Bill, you are correct, Sir. All check boxes are now visible after changing the display settings to a smaller size. I guess the size of the window does not increase accordingly when the contents of the window are made larger, i.e. the contents gets pushed beyond the window's border when changing the display text size from small to medium.

 

Thanks!


LOL a lucky shot in the dark.  Smiley Very Happy

Re: Data Recording Freezes When Value Reaches Zero

$
0
0

I'd put either probes or indicators on all inputs and outputs of the "Q" node on the top right of the diagram.  See if "NaN" is an input or output.

 

One thing that's not obvious about NaN is that literally any comparison to it and another number returns False, and any math operation between it and another number gives you another NaN.  This is true for all things, some of which are really counterintuitive...  For instance, checking to see if NaN equals NaN returns False, and zero times NaN equals NaN.

Re: Data formatting in Ms Word

$
0
0

And how to remove the empty lines in between table and picture??

 

Regards,

S Nagaraju

About calling dll

$
0
0

How to define the tchar type in labview123.JPG

Re: Subrsion SCC and reusable code

$
0
0

With externals, you can mark files\dirs in you're repo as early. To this means you can choose to update\commit\revert\etc. this repo independently form he 'main' repo. I don't think it's more then that. The external repo files still end up in he main repo, so you will have all revision history and 100% certency you can revert to a previous revision. If a driver is in vi.lib or user.lib, you don't have this certency.

 

I'll repeat this advise. You can live with ignoring this issue. Simply copy libs. There will be no link to the lib repo and he project repo. I understand it's not ideal, but it's no big deal. You can consider it the icing on the cake.


Time record

$
0
0

Hi! I have a problem. I wanna record the time. When i run the my special program, i want to record time and when i close and again open my program it will contuine.

 For example i run the program and it wil count time. After 5 minutes i close my computer than i open the pc and my special program in labview. It contuine than 5th minute 5.-6.-7.... minute.

Re: DLL access violation - unless caller's FP is open.

$
0
0

550nm wrote:

 

 

When I originally posted this question, it was not clear (to me) whether LabVIEW might have a roll in the cause of the error.  Now, having built a  simple test-case that only calls the DLLS ("DLL_Init"), it seems likely that the error is related to improper CPP coding.  Still, if you have the experience to help solve this problem, your help would be appreciated!


In my extensive development work with C DLLs in the last 25 years, whenever it crashed it was related to my C code in the DLL and NEVER EVER to LabVIEW! Maybe I'm a bad C programmer but when incorporating DLLs into LabVIEW the chance that any such error is related to that DLL rather than LabVIEW is almost 100%, with an infinitesimal small chance that LabVIEW does something bad.

 

And yes there existed bugs in parts inside LabVIEW that could crash your application. From the top of the head I can remember two particular ones: Heavy bidirectional TCP/IP operations through the LabVIEW nodes could somewhere around LabVIEW 6 or 7 run into race conditions that would crash your application. More recent there was a bug in the protection of queues and other synchronization objects that offered a very small time window (a few nanoseconds only) in which a reader could access the queue while its state was modified by the writer side. It was not likely to be hit unless you had a very heavy use of that object but it could happen. None of these involved however any use of an external DLL, it all was fully reproducable in pure LabVIEW and adding (properly) working external DLLs would rather have minimized the chance to trigger this bug as there would be likely more to do in the app than just sit there and hit the queue as fast as possible with accesses.

 

Your guess that it is related to the PerformCollectThread() function was also my first hunch. But I can't see at a first glance anything that would have cross DLL influences. The gbStartDAQ event is a nameless event so can't be referenced by anyone who doesn't have the actual event handle.

 

There are various questionable things in that code such as the call to timeEndPeriod() just before terminating the PerformCollectThread() function without a matching timeStartPeriod() anywhere I can see, or the ghStartDAQ event handle that never gets closed properly and I believe there are other such resources that are not guaranteed to be cleaned up properly, but that should not cause a crash, only handle leaks that could add up over subsequent cycles of DLL_Init() and DLL_Close().

 

Or what to think about code constructs like this:

    CollectThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)PerformCollectThread,
						 (LPVOID)NULL, 0, &CollectThreadID);
    SetThreadPriority(CollectThread, THREAD_PRIORITY_HIGHEST);
    if  (CollectThread == NULL)
      retval = -1;
    else
      bDLLOpened    = TRUE;

where the validity of the thread handle is only checked after an attempt to set the thread priority.

Labview with fuji PLC by modbus

$
0
0

Dear all

i am very new in modbus communication of labview. i want to connect Fuji plc with labview but did find any example. can any one help me or give any example related to siemens plc communication with labview by modbus so i can get idea.

 

Thanks,

asif

Re: About calling dll

$
0
0

It's not a TCHAR. TCHAR is the Win32 API name for a character code point that could be either Unicode or ASCII depending on preprocessor magic. Because your API specifically specifies that it is Unicode and Visual Basic Strings are Unicode anyways by default it is an array of WCHAR's.

 

This is basically an array of uInt16 integers. And you will need in addition to use some ASCII to Unicode conversion library to convert your LabVIEW strings to Unicode strings in order to pass them to this function.

The function name you need to set in the Call Library Node configuration is most likely called lmcl_initial2 and not Initialize, which is only a Visual Basic alias to use in the Basic program.

Re: Data formatting in Ms Word

Viewing all 203752 articles
Browse latest View live


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