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

Change PID Toolkit to Formula Node or Etc

$
0
0

Hello All,

Good Morning,

 

I want to ask about PID toolkit,

Can u help me to convert the PID toolkit (see attach file) to Formula Node/Etc like arduino program C,

 

Formula Node With Input,

- Setpoint

- Output gain

- Pid Gain

 

And the outpu

- Output value

 

Thank you,

Stew kidz


LabVIEW equivalent of DAQmxRegisterEveryNSamplesEvent

$
0
0

Hello,

 

I am trying to translate a LabWindows/CVI program to LabView, but I've hit a snag in my development.  The way the CVI program works is it starts running a continuous waveform with regeneration disabled and registers a buffer generation and writing function to DAQmxRegisterEveryNSamplesEvent.  This makes the code responsive to the signal voltage controls on the front panel.  I've searched the LabView DAQmx functions but I can't find it anywhere.  Is there such a function in LabView, or am I looking at putting an event handler on a separate thread and calling the function manually?  Thank you for your time and please have a nice day.

 

Surge

Receiving VIA VECTOR CANCASE_XL_Dividing the Received message into ID and DATA

$
0
0

Hello!

 

I need to make a project in which i will receive data by CAN and then based on the received data ( ID and DATA)  I need to send some CAN message in response.  

I am using Vector CANCASEXL with LABVIEW 2015. 

I really want to thank Mr. TroyK who have already put VIs for sending and receiving data by Vector CANCASEXL at:

https://forums.ni.com/t5/Example-Program-Drafts/Vector-XL-Driver-LabVIEW-wrappers/ta-p/3524976

 

I have checked both of these VIs and they are working accurately at my end as well. But the Receive.VI shows combined CAN data . I need to get one CAN message at first and then separate the ID and the DATA from it. Based on each ID and first two bit of CAN DATA, i have to perform different actions.How can we separate ID and DATA (bits)  from the received CAN message? 

I am beginner on Labview. I would be very thankful if some give me one  example of doing so..

 

labview counter sampling problem

$
0
0

Hi, I'am new to labview and have some trouble about my code.

My purpose is to use the counter to count the number of digital pulses in a specified time period (here I use the target time), each pulse represent a particle and  with the flow volume during this target time I can calculate the particle number concentration. Since I need to start the counting for each specified time period form zero, I use the case structure to restart the counting task once the target time elapsed. Also, I need to use the analog input channel to test the pressure (here it is represented as voltage) and synchronize the concentration and pressure sampling and show them in one chart.

My problems are as follows:

1. For the target time, if I set it as 1 second, the counter sampling works well and the concentration got from labview is close to the real concentration. However, if I decrease the target time into 0.1 seconds(which means I increase the number concentration sampling frequency), the concentration got from labview is far from the real value. I just can not understand why this difference exists?

2. As my code show, I use the select structure for the concentration calculation, for the true case, when the target time elapsed, I will get the maximum value for the counter signal array(which is the total number of pulse during the specified time) and divide it by the volume(can be calculated easily) to get the concentration. However, for the false case I just want to let it returns void (which means the result will not show in the graph), but I failed and now I use the constant zero... is there any way I can ignore the false case and just get and show the true case result in the graph?

3. Finally, if I want to save the data and let the data file show pressure and concentration at each particular time, what should I do, I tried the "Write to measurement", but it seems not work as I described.

Attached is my work, thank you!

how bat file gets System Exec.vi standard input ?

$
0
0

G~CRW%(RG@(LOAN5L8TZ@1L.png
hi,
I use System Exec.vi to exec my bat file. my question is how to get the vi standard input in bat command.
I wanna use vi standard input as bat's parameter.
thx!

How to constrain the input values to meet desired condition?

$
0
0

Suppose x and y are two controls on front panel

Constraint: P<= x+y <= Q

How to program such that user cannot avoid this constraint.

Problems with SubVI

$
0
0

Hi all....I have developed one main VI and in that i m calling a subvi which counts the on and off time of the boolean switch...means whenever i switch on the boolean switch, it starts counting of the time it remains on and the same will be done when i switch off the boolean switch...so the problem is when the subvi starts running, my main VI is not showing output as per my subvi controls...even i can not control my boolean switch from main VI....I cudnt figure out what is the exact problem??? Is there any one who can help me??? I have attached my program...!!!

Clock Synchronization FlexRio

$
0
0

Hi , 

Im using the FlexRio Kintex 7 Board for my Design. Im using 6585B adapter.

I needed 4 different clocks , 3 of the clocks i generated by PLL which was generated by Vivado (20Mhz , 100Mhz , 100Mhz Phase shift 180) . the forth clock is a very slow one , its 40Hz, so i wrote a VHDL code for it (a Counter) .

I planned to use the internal clock of 40Mhz , to be the clock for the PLL and for the Counter(40Hz).

I have few questions :

1. How can i route the the internal clock of 40Mhz to be the input for the PLL and the counter ?

2. For timing performance , Should i make CLIP and put it to labview or Leave it as a VHDL Code and insert it to adapter VHD File ?

3. Is there a way to synchronize between all of them ?

 


Copy and Paste code_LabVIEW 2017_Bug or expected behavior?

$
0
0

Hello

 

I have been seeing a very strange behavior in LabVIEW 2017, which I think is a bug. I do not remember seeing this behavior in any previous versions. 

 

Note

I do not yet have any patches or SP1. 

I do not have any other version of LabVIEW installed on this PC.

 

When I copy a part of the code using Ctl+C and then use Ctl+V keys to paste it in another subVI (of the same or different project), the code is not always pasted, depending on what other keys were pressed in between.

 

Works when:

Copy code from VI 1, paste code in VI 2, then save VI 1 and VI 2.

Copy code from VI 1, paste code in VI 3, then save VI 3.

 

Does not work when:

Copy code from VI 1, paste code in VI 2, save VI 2, then paste in VI 3. VI 3 does not get pasted with the code. I can even try Paste option from Edit menu but it does not paste. I have to copy again after every Save action.

 

Copy code from VI 1, save VI 1, then paste in VI 2. VI 2 does not get the code. 

Copy code from VI 1, save All in project, then paste in VI 2. VI 2 does not get the code.

 

Is this a bug or some new feature in LabVIEW 2017?

Can anybody else see it on their systems?

 

Regards

Freelance LV

writing wavefrom to array trouble (PMX,HBM)

$
0
0

hi,

 

I am currently working on a project with Labview. We are doing measurements with a loadcell. The loadcell is connected to a PMX module from HBM (analog in). So we are using the HBM drivers for that. The output of the VI is a waveform (see picture). It is no problem to get the data displayed on a wavefrom chart. (sampletime is 20ms).

 

We need to store this data for later use. On this forum i allready tried to find how to read excel files in labview but i think that's a bit too complicated for a beginner like myself. Now i'm trying to store the data in an array. That way it would be possible to use 1 array as the x-axis and another as the Y-axis so we can form a new wavefrom.

 

But it doesn't work with my code. The array will only store a few points. The amount of points stored seems to depend on the sample time. It's like the array will only store the data of the last second of the measurement

 

Althought when i open the excel file i can see all the data. (excel file is attached + picture of a measurement)

 

Currently i used the "get wmf comps" and try to write the Y in an array.

 

Could anybody help me to store all my data in a array.

Thanks in advance!

Laurens

Determinism in RT application

$
0
0

Hi,

I have an RT application with many parallel processes, and over the years just about every type of communication method has been used at one point or another to transfer data between the various processes.

 

  • Notifiers
  • Queues
  • RT FIFOs (single element and multi element)
  • Globals
  • Single Element Single-process Shared variables with RT FIFO enabled

I understand that the Queues and Notifiers are not good for determinism, but most of these are using clusters as the data-type, so I can't simply swap them for RT FIFOs or Shared variables with RT FIFO enabled.

 

So then what is better for determinism and processing time; Globals or Notifiers? Are there any other options? Are FGVs any help in RT situations (I've never used one)?

I'd also like to know whether there's any difference between having one Globals vi with many variables in it or many global vis with only 1 variable in each?

 

Sorry for the slightly waffling nature of this post!

Thanks,

 

Andrew

  

Real time multiple plots

$
0
0

I'm trying to overlay the readout of an instrument on the same plot in real time. I'm trying to get the output of graph 1 to be plotted point by point. Or find a way to remove the return to origin line that appears in graph 2.

 

 

multiplotsmultiplots

Wtf is buffer size for continuous data

$
0
0

I've looked at webpage after webpage and manuals, please ffs do not send links, and try to explain it like I'm a 5 year old. 

IMAQ limit user ROI selection rectangle

$
0
0

Using LV2014 and Vision 2014.

 

I have a camera whose frame output is 2 images side-by-side, so the first 1280 columns are image 1 and the next 1280 columns are image 2.  I display the 2560 column image in an external window (IMAQ Windraw), along with the ROI tools. The user can then use the rectangle tool to select a ROI.

Is there a way to limit where the user is able to select such that the ROI is limited to be wholly in image 1 OR image 2 and not be part of both images?  Put another way, can the ROI be limited such that the maximum column is 1279 (for a ROI in image 1) or minimum column is 1280 (for a ROI in image 2)?  I of course could split the image into 2 IMAQ windows, but I'm wondering if there is a solution without doing that.

Error -2146827284 occurred at Exception occured in Microsoft Office Excel: Unable to set the LineStyle property of the Borders

$
0
0

Hi,

I've got a LabView 2015 program running in Windows 7 that:

  1. Opens a spreadsheet and loads a bunch of data (test bench master.xls).
  2. Prompts the user for some input.
  3. Runs some tests.
  4. Opens a template spreadsheet.
  5. Writes the result data into a new instance of the template.

Recently I added a feature to Step 2 to write some of the user input back into a particular column in a particular worksheet of "test bench master.xls" using the "Excel Easy Table" vi.  It does accomplish this task correctly without warning on my laptop where I have LabVIEW installed and Excel 2010.  It does the same when I build the application and run it on the customer's computer with Excel 2007, but it generates an error (named in the title of this message) an error window.  The user must press okay in the error window, and then the data writes.

 

I get the same results with the sub vi that accesses Excel separate from my program, so I've just attached the sub vi here.  I'll also include some screen captures about the two PC environments and the "test bench master.xls" spreadsheet with proprietary stuff removed.

 

The sub vi basically reads the column of data, pads the new data with blank lines if it is smaller in size then the original data, and then writes the new data back to the spreadsheet overwriting the existing data.

 

How do I make the error go away?

 


LabVIEW: Memory is full when updating graph

$
0
0

I am using windows 7 32 bit OS with 8 gb of ram.

I am using CDAQ for capturing data and sending it in a queue to the main program where i am plotting the data in graph and setting the tolerance and limits for comparing the results. For short cycle time there is no issue. But after 2 to 3 minute the queue elements are not becoming empty. So RAM usage becoming high and labVIEW memory full message is showing. This happens in each case where graph is being updated.

Including ActiveX Class

$
0
0

Hi,

I have doubt in how to add the required activeX Class for the excel object through the browse option.

I raise this question because initially i created this excel application constant from the automation open function. At that time i when i right clicked for the select ActiveX class option it was showing only two options like Excel.Range and Excel._Application.

 

After going through the examples in the forum i found the same constant has other option as shown in the figure (Excel._workbook and excel.Sheets) when the select ActiveX class option is right clicked.

 

So how can we browse and select the required option by our self.

 

Data packets RS232

$
0
0

I want to send two packets of data with a few milliseconds pause between them. Like on a picture. But packets send in same time. This did see in "NI I/O Trace" monitor. Enable write buffer to device did not effect.

Communicate with motion controller through a USB port

$
0
0

Hello,

I asked this question already but I missed the guidelines for posting and got no response, so I'm gonna follow it closely this time. Also, this is my second week using LabView so please excuse me if I don't make sense.

 

I'm trying to communicate with a stepper controller unit through a USB port. Originally, I used an Arduino and outputting HIGH/LOW to the controller's input pins, and it worked. The project recently got changed and now, I must communicate with the controller directly by sending ASCII (please see the attachment below for the manual pages). I went through the tutorial of configuring the port using NI Device Wizard and had the .INF file installed. However, the device shows up in MAX as a serial port instead of USB port. So, my first question is How do I know if LabView is correctly communicating with the controller/If I successfully configured the COM port? I tried writing *IDN?\n to the controller using VISA Test Panel and return data showed no error with return count: 6 bytes. However, nothing happen when I wrote a command to the controller. Also, the tutorials I saw were for Windows 8 and previous versions of LabView so I'm not sure if I even needed to go through all that in the first place.

 

I'm using Windows 10, Labview 2017, and the controller is DPY50611 from Anaheim Automation.

 

Thanks in advance!

 

.txt filve into wave form

$
0
0

hello everyone i would like to know how to do an wave graph by me having a .txt file with 3 columns witch the first is time (S), second volts (v) value and third current (A) value I need to put those values into 2 XY graph wich the first graph is time ((x axis) and volts (y axis) and second one time (x axis) and currente (y axis), ill put the .txt file in here to i would really like some help if possible

Viewing all 66896 articles
Browse latest View live


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