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

Advice on communications between UI, event handler, and qsm with many variables.

$
0
0

Dear all.

 

I have been looking and looking through the forums, but have not really managed to reach a conclusion, so now I will try asking all you great developers out there.

 

My problem: 

I am creating code to control a setup on a microscope, namely controlling a pressure pump, stage, camera, shutter etc. This means I have a UI with a myriad of buttons and values with settings which control the parameters needed by the hardware. My usual approach is to bundle up VI server references for each item together with an event queue and then pass it as a type def. between the different parts of the program, such that my main VI simply contains a subVI with the UI, a sub VI with the event handler (dynamic events from the references), and a subVI with the queued state machine (event consumer). All linked together using the type def. cluster control. This does require a lot of property nodes, despite in most cases, I only need to read and/or write the value of the items being passed by the control ref. 

 

Is there a more elegant way to achieve this? I have been thinking about global variables. There are waaaaaaay too many variables to pass them through the connector panes alone.

 

Actually the software has been developed before, but I am updating to LV2017 (from 2011) and adding some new features. The previous developer had everything in one VI, and just used local variables to read and write the values. I judge that race conditions were not really an issue, as the values were used just once in each event, and the QSM would handle the events one at a time. However, I would prefer to be able to split each loop (event handler and QSM) into their own subVI for better readability.

 

I am sorry I don't have any code snippets or something to give you right now, as I have started over again (for the third time....) and the code is very much non-existing before I solve this problem, however, I think my question is more of a general one anyway. 

 

Thanks for your inputs!

 


Problems with parsing XML

$
0
0

Hello everyone,

 

I have trouble parsing XML in LabVIEW 2017.

My XML-file looks like the following:

<?xml version="1.0" encoding="UTF-8" ?><ResultData><Info><Item name="Version"><Param name="major" key="88" value="0">major =&gt; application software version major number</Param><Param name="minor" key="89" value="0">minor =&gt; application software version minor number</Param></Item><Item name="Time"><Param name="year" key="93" value="2019">year =&gt; application software build year</Param><Param name="month" key="94" value="4">month =&gt; application software build month</Param></Item></Info></ResultData>

What I wanna do is to look for the "major" in "Version" and get the following "value".

 

This is what I tried so far:

Unbenannt.PNG

 

I can't figure out what's the correct XPath-Command to accomplish this task.

Mabe there is some XML-expert who can help me!

 

Thanks,

Sylvan

Need to find In Port and Out Port vis.

$
0
0

Hi all.

I have some software running on old hardware that uses In Port.vi and Out Port.vi and I need to modernise it. I can't run it because it doesn't find these sub vis when loading. Is there anywhere I can find them? I don't have any very old versions on my machine any more. Thanks

Vision Assistant Crashes Vision Builder

$
0
0

Hi All,

 

I`m new to this forum so was unsure where exactly to post this so I took a gamble and selected here.

 

I have LabVIEW 2018, NI Vision Builder and Vision Assistant 2018.

 

Whenever I acquire an image in vision builder and then select the tab to edit this image in vision assistant, vision builder crashes and I get this error report attached.

 

I have completed numerous searches and have found discussion forums relating to this but cannot seem to get it sorted.

 

Any help greatly appreciated Smiley Happy

 

 

Open Application Reference over network

$
0
0

Hello there! 

I have a question about Open Application Reference under LV7.1. I am working on some code where an executable from a PC will call basically an other VI that must be made into an exe. The call will be via System exec.vi. However I have to thinker with the memory of the caller exe via VI server. For that I need to open an application reference. According to the help I should be able to use localhost for the machine name though I am pretty sure I'll have to store this executable on a network location. So the question would be whether or not I have to get the caller PC-s address and give it to Open Application Reference, or is localhost fine? Since the VI will be ran on the same PC that the caller is I think it should work despite it being on a network location. According to the help localhost will connect with run time engine on the PC.

 

If this is not the case how can I easily pass the caller PCs address? Sadly I can not alter the caller side, however I have some limited control over the string that system exec.vi gets. It is very limited though as I am forced to have the following syntax: [UNC path of .exe file to be called][space][parameter1] [space] [parameter2][….] so I can not include anything like \k before the path to the executable. I can probably use the "after" parameters but that won't help much I believe....

 

I hope my question is understandable J Though regrettable I think I can not show any useful code to help better understand it.

List of Network Adapters to Choose

$
0
0

I'm wanting to find a way to populate a list of the network adapters on the PC > and in turn, allow the user to select the proper one. On WinXP/Win7, the below VI did what it's supposed to and LabVIEW grabbed the "Primary" ethernet interface.

 

Capture1.PNG

On Win10, LabVIEW is now grabbing virtual adapters on many of our test PCs. I expected to find a straithforward way to do this, but have not come up with anything.

 

I found this, https://forums.ni.com/t5/Example-Programs/Get-Network-Card-Information-Using-LabVIEW/ta-p/3495745?profile.language=en, but have not been able to get it to run...and it's a lot more than what I need. I'm really just looking to display the IP for the user (if there's more than one) and allow them to select it.

 

I've got a good understanding of how to display the IPs, and allow them to select it and such...I'm looking for how to populate the list. I've thought to use "system exec" and "ipconfig /all", then parse that, but i figure there's a better way?

 

Thanks!

Jeff

Program runs fine in development environment but compiled executable instantly closes on launch

$
0
0

I have never ran into this one before. My program runs fine when I launch it in the LabVIEW development environment. But once I compile it the executable does not run, it launches and immediately closes. I can see the LabVIEW icon pop up on the taskbar for a second then it goes away and the program itself never actually opens.

 

No error messages are displayed from LabVIEW or Windows.

 

This occurs on more than one target machine and my development computer.

 

I don't even know how to begin troubleshooting this besides trying to rebuild which I have...

Error de Compatibilidad VISA-GPIB


Model interface toolkit: discrete time integrator from Simulink doesn't work

$
0
0

Hello All,

 

I am running simulink dll on RT target and accessing model input out put signals through model interface tool kit as shown below. All output signals updates except output signal coming from discrete time integral. I verified working of this signal by importing model dll into Veristand. I am not sure why it doesn't work in model interface tool kit. Any help is much appreciated on this issue.

 

 

 

 

Agilent digitizer U1082A query ID failed -1074003967

$
0
0

Dear members,

 

I have -1074003967 error when initializing my Agilent U1082A digitizer. 

 

Discription: I have 64-bit OS, Windows 7, LabVIEW2009, Agilent U1082A digitizer is installed on PCI slot6 and is visible under Windows device manager.

 

Problem: I try to run a demo LabVIEW program, but it shows error saying "parameter 1" is out of range, where parameter 1 is instrument ID (AcqirisDemoError.png)

 

What I did:

1. tried AcqirisLive software provided by the manufacture and was able to see the card & calibrate it.

2. checked drivers (AgilentDriversInstalled.png), they are installed.

3. checked VISA (VISA.png)

4. checked NIMAX (NIMAXdirectory.png), I can see card in PCI6, but I'm a bit concerned because PXI system is "unidentified", can this cause the problem? How to fix it?

 

NI Max: "Reserve Network Device" Missing

$
0
0

Hello, I'm currently trying to install NI MAX on a new account on my company's terminal server. The current account has NI MAX 17.5 and the new account has NI MAX 18.0. I was able to install NI MAX 18.0 on the new account. I'm able to see all of the expected network devices on the new account, but the option to reserve the device doesn't appear on the new account. The software on the new account will detect if I reserve/unreserve the chassis on the old account, as you can see in the two screenshots. Can anyone please help on why the ability to reserve the chassis isn't present?

 

The old account is running Windows Server 2008 and the new account is running Windows Server 2016 in compatibility mode for Windows 7. Could the Windows Server 2016 potentially be the issue here?

 

I trimmed the actual names of the devices in the screenshot for the purpose of sharing it publicly. 

Onscreen keyboard with touch AND keyboard input?

$
0
0

Does such a VI exist? I have tried modifying the HMI_PopUp_KB VI with Key Down events to allow keyboard input into event triggers for the normal alphanumeric cases, but am not getting quite as far as I'd like; thought I'd ask around before spending a lot of time troubleshooting what I've got. 

 

Waveform measurement

$
0
0

Hello

i need to calculate total number of groups of 1 as shown in attached waveform using labview. The multiple 1-0 transitions represent exhale and continuous 0 shows inhale cycle. I want to calculate respiration rate from this wave. Please suggest ideas on how to do so using labview. Input is in digital form only. I am using LINX for arduino labview interfacing.

How to receive data from a third party device into Labview?

$
0
0

Hello,

 

I am a new LabVIEW user. I am trying to collect data into LabVIEW from a third party flow meter connected via USB port to my computer. I installed the flowmeter software and can read the data using the software. But, not sure how to make it talk with LabVIEW. Can anyone tell me where should I start?  FYI...Attached is the manual for the flow meter.

 

Thanks,

 

 

MyDaq w/ Labview

$
0
0

I have attached my code, block diagram, and front panel. 

The goal of this set up is to count "jumping jacks" which is an moving accelerator right / left direction.

The error we see, is that when we surpass 10 or stay below ten, we get a failed message either way. how do we fix this?

Also we need to count peaks not data points above the threshold. How do we do this?

Any help or advice is appreciated!


Execute order of an event trigged by other event

$
0
0

Let's say I have an event structure with 2 events A and B. From front pannel, I set up 2 (switch not latch) booleans for each event. Inside the event B, I used the "signaling value" property on boolean A to trig the event A as needed. It works! but the problem is that event B is always executed FIRST before the event A regardless of how you arrange it (put them in the flat sequence, errors connections daisy chain, etc). How could you make the event A execute first? Note, this is the only set up that work for my application. Can't alter to other method. Is there a way?

 

Start and stop parallel while loop

$
0
0

I have 2 while loops running. When the Boolean <Optimum Vacuum> goes true, the while loop below starts counting up a soak time.

There are conditions where <Optimum Vacuum> in the top while loop goes false. At that point, I want the lower while loop to go false and stop adding up the soak time.

 

The <Optimum Vacuum> variable in the bottom while loop never changes state from true to false, as it changes state in the top while loop.

How can I make that variable change state as needed?

 

Thank you

 

parallel while loop.jpg

USB VISA WRITE 4 bytes to FPGA

$
0
0

hi, 

i am new to lab view. 

my requirement is:

i have to sent some(5)  bytes of data to FPGA. 
using VISA WRITE function.
 
i have tried using some VI's available as example. 
but showing some errors.
 
please review my code(attached) and suggest to overcome the issue.
 
 

Licensing LabVIEW using SoftwareKey

$
0
0

To license LabVIEW toolkits and executables, which of the following is the best suitable tool to use with TPLAT advanced mode?

Protection PLUS 5 SDK LabVIEW Edition or

Protection PLUS 4 or

Protection PLUS 5 native edition

 

Which of the above is compatible with NI Tools Network Development qualification criteria? The requirement is to implement all advanced licensing features on LabVIEW code. 

Error 400

$
0
0

Hi Guys, do you have any idea how to fix this error?

 

Error 400 occurred at REST Client.lvlib:REST Client.lvclass:Error Handler.vi

Possible reason(s):

HTTP error: Bad Request

Viewing all 69575 articles
Browse latest View live


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