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

Re: How to get the Reference Number from an User Event Refnum?

$
0
0

Thanks all. U32 is working.

 

Basically what we are doing is LabVIEW-C interaction.Suppose when we want to speak from C to LabVIEW, C will Generate an user event that is registered in LabVIEW. So to Generate the user event, C has to know the User Event Reference Number.

This is just a brief idea about what we are trying to achieve.

 

Anyways, Thanks every one for your help. 


Re: Wait on Front Panel Activity crashes labview?

$
0
0

 wrote:

Where else in your code are you switching the controls?


Nowhere, other than by the user clicking the button. They're read in one place, where they control a case structure, either case of which is acceptable and independent. They're changed only via the FP. They're literally as simple as a variable can be.



What happens if one is switched and the other is not?


One controls whether to do a background read, the other whether to advance which set of channels is being read. They're independent, and can be in any configuration, with no interference. If 'do read' is true, a read is done. If 'advance page' is true, it increments the page number (a basic int) before reading, otherwise it doesn't.

 

Re: How to get the Reference Number from an User Event Refnum?

$
0
0

 wrote:

Thanks all. U32 is working.

 

Basically what we are doing is LabVIEW-C interaction.Suppose when we want to speak from C to LabVIEW, C will Generate an user event that is registered in LabVIEW. So to Generate the user event, C has to know the User Event Reference Number.

This is just a brief idea about what we are trying to achieve.


You don't need to typecast the refnum for that. You can configure the Call Library Node parameter to Adapt to Type. When you then let LabVIEW create the C code you will see something like this:

 

int32_t MyUserEventInstaller(LVUserEventRef *userEvent, .....) { /* Now you can store the user event refnum somewhere where the C code can reference it later on by calling PostLVUserEvent(m_Event, data); */ static LVUserEventRef m_Event = *userEvent; /* Obviously a flexible and scalable solution will not store the event refnum in a static variable but somewhere in a context, object or similar that is also passed to the specific functions somehow such as by a handle */ }

 

Technically a LabVIEW refnum is indeed an uInt32 value but there is no need to specifically use that. The LVUserEventRef declaration in extcode.h makes sure that the correct type is used even if LabVIEW 2028 may suddenly decide to make this something else instead for instance to support some new 128-bit hardware architecture. 😀

If you use uInt32 instead you make your code depend on assumptions that are unneccessary and that make your code less maintainable in the future. And you need the extcode.h include anyhow for the declaration of the PostLVUserEvent() function.

Re: .net Form from Labview GUI

$
0
0

 wrote:

Hello,

I would embed a GUI developed in a Windows Form in a labview GUI, is it possible?

Thank you in advance


Why?

What does the Windows Form have that LabVIEW cannot give you and that you cannot create yourself ?

 

 

.

Re: hex display to number

$
0
0

Sorry about my post if that upset you. After I gave him a kudo, I thought I would like to say  "thank you" to him as well. 

Re: hex display to number

$
0
0

 wrote:

Sorry about my post if that upset you. After I gave him a kudo, I thought I would like to say  "thank you" to him as well. 


The real problem is the lack of any connection to which post you were thanking.  Quoting helps here as well.  But, yes, Kudos are more appreciated.

Re: SMC JXC928 Ethernet/IP Motor Driver with LabVIEW

$
0
0

Hello, we are trying to work with the JXC91 controller as well.  Could you by chance share your code that allows you to communicate?  We have no experience with Ethernet/IP devices.

 

Thank you

Re: Parametrized database query returns different results from hardcoded query on new Windows 10 machines, but not old W7 machines or an old W10 machine.

$
0
0

I agree with rolfk.  I seem to remember a setting for MySQL driver about using single or double quotes in your queries.


Re: LabVIEW NXG 4.0.0: Addons OpenG Library and JKI-SM; no install with NIPM; must be installed manually

Re: LabVIEW NXG Graph grid lines display

$
0
0

Hi Christina,

 

Thanks for your answer, I am glad to see you pointed out and plan to correct the bug.

For now, switching the scale to logarithmic as suggested by Shezan works surprisingly well as a workaround.

 

Best Regards,

Re: Would like help integrating hardware with the Continuous Measurement Data Logger template program

$
0
0

 wrote:

Hello. I am very new to LabVIEW but not to programming. I just need something very simple and I'm sure you guys can help. I have a LakeShore Teslameter that has a usb connection. Would very much like to quickly get the "Continuous Measurement Data Logger" template program that ships with LabVIEW to work with this device. Secondly I was wondering how I can automatically have the program export to an excel spreadsheet when the "Stop" Button handler is called. 


Well I have headed down that path and in the end it took less time to start from scratch then to figure out how to decouple that NI example. Everything in it is so tightly interlocked it was impossible to change it to use any of my instruments.

 

Continuous measuring, logging, and saving data is one of the simplest tasks LabVIEW can do and this example severely over complicates the process.

 

Unless you are using a high speed DAQ that require a Producer/Consumer architecture, a simple state machine is all you need...

 

Possible states could be:

  1. Initialize instruments
  2. Open data file
  3. Take measurements
  4. Display/Save data
  5. Timer (goto 3 when time elapses)
  6. Error (safe shutdown on error)
  7. Exit (close file and exit)

 

I want to save the Acquired data from agilent

$
0
0

I am using Agilent 34972a for data acquisition and I have developed a model to save the data in the excel file but the data is not being saved. 

May I know the issue in my programme.

Re: VIAS USB data format

Re: STFT spectrogram

Re: FPGA not enough BRAM?

$
0
0

Hi ngb222, 

 

Please let me update about the BRAM usage of LabVIEW FFT IP.  Today, I received update from NI support about unexpected extra amount of BRAM usage for the IP on LabVIEW 2019.  It will be fixed on LabVIEW 2020.  

So, if you are using LabVIEW 2019, try compiling the FPGA code on LabVIEW 2018 and use that bitfile on LabVIEW 2019.  If you can wait until LabVIEW 2020 release, please just upgrade.  


Re: Reporting a LABVIEW bug

$
0
0

 wrote:

When crashed, it automatically ask to report to NI. I did it many times, but no response from NI. It just forced to quit; no way to investigate. I don't understand the nature of the crash.


The intent of the error reporter is for NI to collect crash report and perform statistics on them. It's not a way to get in NI to contact you. They will only do that if your crash is interesting enough for them to need you, and of course only if you supply your email.

 

You might want to remove your email from the crash report if you post it here, BTW. I wouldn't be surprised if those webbots look in zip files to collect new spamees.

 

I never heard from anyone that NI contacted them as a response to a crash report. That doesn't rule out that it ever happened of course, but I wouldn't wait for it to happen.

Re: STFT spectrogram

Re: VIAS USB data format

$
0
0

 wrote:

While searching for something else, I came across this : http://www.ni.com/tutorial/4478/en/#toc2

which may be useful for you.


Well that would be USB Raw communication. For this to work you need to know the USB data protocol used and I haven't seen anywhere documentation about that. Noticably there isn't any Linux support for this device either which is another indication that AD wants to keep this tech proprietary and hasn't released any protocol specification.

Re: VIAS USB data format

$
0
0

 wrote:

 wrote:

While searching for something else, I came across this : http://www.ni.com/tutorial/4478/en/#toc2

which may be useful for you.


Well that would be USB Raw communication. For this to work you need to know the USB data protocol used and I haven't seen anywhere documentation about that. Noticably there isn't any Linux support for this device either which is another indication that AD wants to keep this tech proprietary and hasn't released any protocol specification.


I did not delve in-depth into the Analog Devices documentation  - 1 minute max. Offering it as a possibility if it is use-able; the OP will have to determine that. 

 

.

Re: .net Form from Labview GUI

$
0
0

I can do that with .net, ActiveX, or Windows API.

 

 

Viewing all 203672 articles
Browse latest View live


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