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

Integrate one VI into another

$
0
0

Hello,

 

Does exist a simple way to integrate one VI into another ... both having quite rich GUI.

I've proceed in following manner:

  • In the MASTER VI I've created TAB control with 2 tabs ... let say MASTER & SLAVE
  • Into the MASTER tab have moved whole MASTER front panel staff
  • Into SLAVE panel copy-pasted whole front panel staff from another (SLAVE) VI

Then when I have a look at resulting block diagram, I see that block diagram staff from SLAVE VI is scatterd over original block diagram.

 

Thanks in advance

 

 


Save As and case structure changed

$
0
0

Has anyone come across this?  i did a 'save as' on a project that was working correctly, without changing anything except saving as a different name there were 2 out of 50 or more true/false case structures that reversed the cases.  This was fun to trouble shoot... has anyone seen this bug and is there a different way to avoid this?

how to pass data to arrays based on the value of first 4 digits of 7 digit strings

$
0
0

I want to sort incoming data, into various arrays based only on the first 4 digits of each string.

For example a hex string could be 41322033333533 which is A1 3353.

A1 stands for a particular sensor., and I want to sent all the A1 data to an array.I have data coming from 8 sensors, and want to send the data to separate sensor arrays. My sensor names are A1,A2,A3, T1,T2,T3,W1

I was going to use a case structure, for loop and an '=' comparison for the data. However I only want to compare the first 4 digits of the string and I cannot find an operator for this. Any advice on how to do this would be appreciated.

 

VI Referenz

$
0
0

Hello,

 


at the moment I try to control a lamp and the corresponding reference VI.

 

I have a VI (Lampe_an_aus.vi), in which I use an event structure to control the lamp and the VI to be stopped itself. This VI works as it should.

 

Now I want to control the lamp from another master VI (Lampe_an_aus_Ref.vi) using referencing and I don't want to use the event structure in the controlling master VI. I want to control the lamp in the master VI itself and that the master VI should be stopped when I press the STOPP button.

 

Can someone tell me, what I do wrong?

 

Thanks in advance.

 

 

Joachim

Writing Continuous Data to An Array

$
0
0

Hello,

 

I am looking for a way to take my continuous data and display it to an array in Labview. The issue I am having is that the data is unreadable due to it being read so fast. I am looking for a way to limit the amount of data points that are being displayed in my array. I am thinking something along these lines:

 

  1. Read and store the data
  2. Display the first data point in an array for 2-3 seconds
  3. Clear the stored data
  4. Store the next set of readings
  5. Display the first data point for 2-3 seconds

 

Any advice on how to achieve or another way to successfully display the continuous data is appreciated.

 

Thanks

NI Scripting: Speeding up "ObjHighlight" or finding an alternative

$
0
0

Hi,

 

I'm working on a fairly obscure topic: I am writing an express-vi that automatically builds an interface based on the parent-vi.

 

 A user can select on a GUI which front panel element of his parent-vi he wants to expose, and communication code is automatically generated to implement that.

For the visualization, I use ObjHighlight and then FP.GetImage.

ObjHighlight is needed, because when I call it, the frontpanel of my parent-vi is opened in the right tab, I get visibility of hidden elements, etc. After that I take a screenshot using GetImage.

 

 

This combination works really well and reliably.
However, it is comparatively slow. ObjHighlight needs a couple of 100ms, to draw user attention to itself.. - and when you analyse a VI with tens and hundreds of FP-Elements, you wait.
Of course, there is pre-fetching and parallelism.. but there has to be a better way to do this?

Right?

Thanks a lot,
B

Problem using GPIB and labview

$
0
0

Hi guys,

 

FInally got recognized my GPIB tool into labview, thats nice. I've created the block ( attached you can see te diagram ) but it works like 20 sec. I press continious run and i can change values in live mode, as i want. But then after 10 secs it appears the error that is in the screen and only working again if i reboot the Function Generator.


The model is Tektronix AFG3102.


Regards

Read value from variant of cluster

$
0
0

Hello everybody,

my simplified scenario is this: I have N clusters, C1, C2, ... CN. They are different but all of them contain a double named D. I want to design a VI that takes in any of those clusters (cluster->variant first) and returns D. I tried to use the Get Variant Attribute with 'D' as name input, but that doesn't work. How can I achieve my goal?


OSCILLOSCOPE PICTURE IN LABVIEW

$
0
0

HELLO ,

I am trying to make the acquisition and signal processing from an oscilloscope ,

and I 'd like to know if I could have the picture goes on the oscilloscope on labview
" without going through the function graph " the exact image on my oscillocope : see enclosed room.

 TEK00001-ConvertImage.jpg

DSC

$
0
0

Hi everyone. I have a doubt. If I have running two standalone applications each of which uses the DSC module. Do I need one or two DSC runtime licenses (the version I use is the 2014)?

Encapsulate communication with serial device in a DLL

$
0
0

I have a situation where we have created a device that uses serial communication and we need to be able to communicate with it from multiple applications (LabVIEW and non-LabVIEW).  Because it's two-way serial communication, I need to be able to serialize all command being sent to it (so I don't have a race condition with response packets from the device).

 

I was hoping that I would be able to create a DLL in LabVIEW (since the other group needing to communicate with it knows how to use LabVIEW-built DLLs already) that would encapsulate the communication and allow me to control, or effectively serialize, the commands being sent to the device.  I have a few questions.

 

Is it possible for two applications to use the same DLL?

If two independent applications instatiate the same DLL, are the functions that are called inherently serialized?

If not, can I serialize them by using a semaphore in the DLL to control the access to the serial device?

 

I'm guessing it has to do with multithreading capabilities (which I'm not all that familiar with) and the access scope of global variabls/FGVs in the DLL when used by multple applications.

 

Any help or suggestions are appreciated.

 

 

Functional Global Variable

$
0
0

I’m using an FVG in to VI’s: main_1.vi and main_2.vi which is running at the same time.

As a normal FVG, the FVG will be seen from both main’s.

Is there any way to change this, so you can use the same FVG to store different data for main_1 and main_2, or do I have to rename FVG to FVG_1 (used in main_1) and FVG_2 (used in main_2).

My FVG have a structure like this:

 

https://decibel.ni.com/content/docs/DOC-2143

 

[FPGA] - NI 9503 Issues with Stepper Driver

$
0
0

I have been having some troubles trying to get a NI 9503 Stepper Driver to run correctly with my NI cRIO 9147. I am using the A+/A- and B+/B- to send out High and Low pulses in a timed interval to generate a square wave to make my stepper move, however it stays in place. I am unsure of what exactly is going on and I have measured on the oscilloscope that our pulse width is 0.5 mS and have no idea of how to increase it. I am using a Bipolar 2-phase SonceBoz 6600-20-1.2 stepper motor and none of the wiring is incorrect or specifications according to the technical specifications.

Any ideas of what could be going wrong here? I have two versions of the code in an attempt to run the steppers. Some of the comments can be ignored as well as the disabled diagram, however all the controls here for the timers are set to 0.5 mS (500 uS) with the exception of Version 2. The idea is to pulse each coil independently to move the stepper motor.

Version 1:
v 1.jpg

Version 2:
v2.jpg

Data Acquisition over Crank angle with two trigger signals

$
0
0

Hi,

 

I am trying to aquire data over time and degree crank angle of an engine. The device I am using is PXI-6251 and LabView 7.1 (it is running on an old system).

I have two digital trigger inputs. One that happens every 720 degrees (or 2 revolutions) (PFI1) and one that happens every 1 degree of crank angle (PFI5). I am using the DAQ assistant to configure the measruement device. I am collecting N samples of data (set to 719) and triggering with a start trigger every 720 degrees and an external sample clock, which is given by the trigger signal every degree of crank angle.

 

Now there are three problems I have with this approach:

  1. The DAQ assistant is placed inside of a while loop and the loop time is approximately double that of two revolutions, therefore I assume every other cycle to be recorded and not every cycle. I want to change that to every cycle being recorded instead.
  2. The time channel in the measurement file does not make sense. The delta_t is given by the specified frequency in the DAQ Assistant, although data is being aquired according to a much slower external sample clock. I would like to have the real time displayed as the x_channel.
  3. In addition to the time as the x_channel, I would like to have the angle degree in the measurement file. 

I am not sure how to achieve this and have been reading into DAQmx for the last couple days, but have not found any solution.

 

Attached I have screenshots of the DAQ Assistant, for easier understanding of my configuration. Any help is greatly appreciated.

 

Sebastian

 

 

[FPGA] - NI 9401 - Digital Input Read Issues?

$
0
0

I am having some issues with the NI 9401 Digital Input, which is having a consistant reading. I have a photogate that is powered off a digital output and is fed back into the module at a digital input, however I am unable to read the input multiple times. My LED blinks once and will never blink again until I restart my CRIO or recompile. I have initiated the input and output ports, turned them on, and loop continously for a reading. Any idea what is going on?

 

photo.jpg


Transfer data constantly from labview to excel file?

$
0
0

I have two labview programs on two different computers: one of them constantly sends patient data to the other one via TCP connection, and I want the information that is received to be saved in an excel file, in the order it gets. For example: (on the first column) at 10 am patient 1 is healthy, (on the second column of excel), at 11 am patient 1 is unhealthy... So I'd need a for loop that, depending, on how many times it's received data, it sends the data to the corresponding to each column in excel? or am I wrong? how could i do it?

2D array into excel

$
0
0

Hi!

 

I am new to labview (2014, student version) and right now I am facing a problem which I can't solve alone:

 

Basically, the vi I wrote opens a .txt-file with 2 colums of data and does some changes to these data (I attached a shortened version of the file to this post).
After the data is changed, I'd like it to be saved to a new excel file with the same name as the the original .txt-file.

 

(Actually, for now I'd be happy enough if I could just save it to an existing file.)

 

Does someone have an easy (!!!) solution? I read on multiple forums, but none of the solutions I found worked properly.
I got as far as to creating a .xls-file, but it only opened in excel after telling me that something was wrong with the file format....

 

Help would really be appreciated, thank you!!

program a 9411 outside of full system

$
0
0

I have a customer where we deployed a cRIO-9022 with an 8-slot chassis, and in the chassis is a 9411 along with some other cards. They suspect a bad 9411, and want to buy a new one. Their 9411 has some cRIO code on it for frequency measurement. They are in a different country than I am.

 

Can I buy a 9411, program it here, and then send it to them and it will work? I've never tried to configure it outside of the system that it will ultimately run in.

 

Thanks

Keith

Interrogation about the Generation From Template

$
0
0

Hi everyone,

 

I'm working on a project where I take lot's of measures in real time (I have to display during the test -> 0,6s   every data like the position 0 or 1 of a sensor, speed, etc. )

And I have to display these data every 0,01s. 

 

The objective is to have an array in Excel which contains every data : 0 or 1 if it's about sensor and a real number if it's a measure. 

 

I already tried different solution but without success, and this morning I found an example include in LabVIEW, called generation from template. 

According to the example, if we got several data write in the front panel, it's easy to display them in an Excel code thanks to a little code. So I created this file like a template excel file, but now there is my problem ! 

 

 

 In the example, all datas were write in a board, that wasn't automatic, everything was write, lane by lane. But this is not my goal ! 

I have to save my data after the test into a board, and then link them with Excel in order to have every data every 0,01s to follow the test in real time and doing a good report. 

 

I got several VIs obviously, my code works, I suppose that I can input my assistantDAQ into the board, it will be in real time, but how can I save in the board every data each 0,01 s ? :s 

My board have to got 15 columns, so it's a really big board finally. and when the test is doing again, this data will change and will be replace by new data. And then, If this things works, it will be easy to create my file how I want Smiley Happy

 

Here is a picture to show you the board which is in exemple. 

 

 

Capture.PNG

 

 

So can you help me to find a way to complete this table as I wish ? :s

 

Thank you in advance for your answers, I hope that I was clear (sorry for my probably really bad english :s ). If you need more precision, or if you missunderstanded a point, don't hesitate and ask me what's wrong :3

 

Regards.

 

Maxime L

 

 

Communication between 2 VIs scenario realisation

$
0
0

Hello,

 

Here is simplified realisation of a real setup.

Here are keypoints:

  • 2 VIs ... let say MASTER and SLAVE
  • In SLAVE VI two values are generated at the same time: aaa and bbb
  • In MASTER VI these 2 values are used consequently: 1st aaa, then bbb

Here are keypoints of realisation:

  • for aaa and bbb transmission a global variable was created Global 1.vi
  • in order to match loop cadence in MASTER & SLAVE, variable loop_delay was added to Global 1.vi
  • in order to stop SLAVE from MASTER, variable stop was added to Global 1.vi

Is such approach the only one to communicate between VIs ?

 

Thanks

 

Pavel

 

MASTER.png

 

SLAVE.png

 

Viewing all 67331 articles
Browse latest View live


Latest Images

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