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

Connect Omron PLC CP1L to Labview through NI OPC server using USB connection

$
0
0

Hi Labview experts! I need help on integrating Labview with Omron PLC CP1L using USB connection. When adding a new channel, which of the device driver I should choose for USB connection? And how to link the tag to I/O in cx-programmer? It would be perfect if anyone can guide me through the whole process. Sorry if my questions sounds stupid as I am really new to these.

 

Thank you in advance

Untitled.png


dSPACE *.idf files reading

$
0
0

Hello all,

 

Please help me if anyone have idea about this.

 

I want to read dSPACE idf (dSPACE Interchange Data) files with LabVIEW. I tried to get the structure of this file format but I’m not getting.

I connected with dSPACE but they are not sharing.

 

If anyone have any information about this, Please help me.

Error code 20312 and 20315

$
0
0

Hello,

 

 

I'm planning on using a MCC DAQ for measuring frequency through an analog port. My input is in the form of pulses with varying amplitude, and I need to be able to measure their frequency. I am very new to this and don't really know what the problem really is.

I have tried two methods and am facing different problems with them. Please help.

 

---------

To simulate the signal, I'm using InstaCal (virtual board from Measurement computing) to generate a sine wave of amplitude 5V. I don't know what frequency the signal is at.

I made a sample program but it keeps showing the error:

Error -20315 occurred at Timing and Transition Measurements2->testflow.vi
" (waveform index 0 of 1)

Analysis:  The waveform dt parameter is <= 0.

I have attached the code below (capture.jpg).

 

----------

I also used the timing and transition VI with the sampling clock and start VIs in a separate code and in that case it doesn't work with a sine wave at all. (displays the message: Error -20312 occurred at Timing and Transition Measurements->UI_2.vi
" (waveform index 0 of 1)

The input waveform size is zero).

For a square wave, it keeps showing some the frequency at "2500", and after 2-3 times of running, throws up the same error (20312) with "2147483647" in the same frequency display.

I haven't put it in a while loop to figure out what happens when you run it once. If I do need to put it in a while loop, which elements should I put in the loop?

Attached the part of the code in capture2.jpg

 

Thanks!

Display the last data in the table control in the first row when I scroll down to the end.

$
0
0

I am trying to make my table control to display the last data in the first row of the table control when I scroll down to the end. Is there any method to do this? I just want the last data to display in the first row of the table control when I scroll down not to the first row of my array. Please suggest some method to do this.

date and hour from excel

$
0
0

Hi everyone ,

 

I am a trainee and I am a new user of Labview . I need some help from you to reach my goal.

 

I need to command a numeric value( voltage value) in function of time range defined on Excel , I sucess to read my excel data and the content of cells but the problem is that I can't make use of date and hour ( string format) and transform them into timestamping on Labview in order to commande the value i wish to drive in funtion of date and hour. 

 

I want that my test start at the beginning time and the duration of the loop is the difference between end time and beginning time.

 

Please find attached my excel file and my VI.

 

Thank you for your comprehension.

Multicolumn Listbox go next line with enter at run-time

$
0
0

Hi,

I have a multicolumn Listbox which I fill with values from an XML file. I want to able to edit "some" cells and save it again to XML.

Each row has a special column, in which it is indicated that whether the 3.column in that row editable or not. This column contains RO or RW, If it is RO I discard the editing, if it is RW I accept the editing. so far sogut. But If I enter text in the cell and press enter, it does not go to next line. How can I go to next line for editing next line after pressing enter at run-time?

Thanks.

tracking and parasite point

$
0
0

Hi everybody,

I`m trying to realize one tracking with LabVIEW Vision, It works not so bad, but sometime I have one problem.
I have to draw the deplacement of my objectand sometimes I have one parasite point, and unforthunately because of that the draw is not good. It happens not often, maybe twice with one video of 2 minutes (20FPS).

It is very important to avoid that.

Untitled.png

So as you can see, I should not have this straight line.

Labview send my each coordinate of my object for each frame of the video.... I have two ideas to delete this parasite point, but I don`t know which one is the best and how to do.

1) I could compare the point before and the point after, and if the point between both of them is to different, LabVIEW delete it.

2) I could put one threshold, I mean if the value is more or less than the point before more or less 20 pixel, so this point is delete.....

I would like to know what you`re thinking about that. Maybe there isa simpl solution. 
I`m searching but at this moment I found nothing ^^

Thansk a lot

Maxime

MAX 5.0.0 does not see any NI software

$
0
0

I am upgrading a very old test system to a new motherboard. I am loading a hard drive from scratch since the old system used a PATA drive and the new system uses a SATA drive. Since this system has been in use for over a decade I also thought loading from scratch would be a good idea.

 

I load everything up in this order:

Windows XP (with updates to SP3)

MAX 5.0.0

NI-DAQmx 8.6.1

NI-VISA 5.0.3

Traditional NI-DAQ 7.4.4 (Legacy)

NI-488.2 v2.8.0

NI-845x 1.1.4

NI-XNET 1.1

NI-CAN 2.7

CANopen LabVIEW Library 1.1.3

 

When I am done MAX does not list any software. My hardware shows up fine. (PCI-6013, PCI-6025E, PCI-8512, PCI-GPIB)

 

Note: My system includes an 8 port serial card and while the ports do list under the MAX hardware section (COM3-COM10) it seems like my software can only access COM1 and COM2. If from within MAX I try "Tools" -> "NI-VISA" -> "VISA Options" nothing happens. I take this as a sign that not seeing software within MAX is at the root of my problem.

 

Also, the "Tools" -> "Reset Configuration Data" option is not there although it is supposed to be in MAX 5.0

 

As far as I can tell everything I am using is compatible. I don't have many other options since some of my software uses Traditional NI-DAQ.

 

What are my options?

Try something else to get MAX 5.0 working? Install MAX 5.1?


'daqmx Stop Task' Causes program to Freeze

$
0
0

Hello All,

 

I have an issue where my program freezes/hangs as soon as it enters the daqmx Stop Task VI.

See the VI snippet below.

 

I have other data acquisition loops in the same vi but it's only this one (analogue input) which causes the program to hang.

 

It also happens if  I take away the Stop Task and leave the only the Clear Task.

 

Seems as if there's something related to that particular task which causes it to take a long time to clear the task.

DAQmx Issue.png

 

Any suggestions would be great help.

 

Thanks

Rhys

divide

$
0
0

how can i generate such numbers where the two number's remainder is 0?always like 4/2 6/3 8/4

How to handle a Large number of controls?

$
0
0

I Want to create an application wich will have to handle a lot of controls on it. I know how to get references of this controls, and how to acces them all programatically, but my problem is that there is just to many of them for Laview to run with no lag. It lags badly even on edit mode when I try to place all the controls I need. I think that ther must be a way to do this, since im going to have a lot of controls (look out in the image, I need 10 tabs of each grup with 5 subgrupsgrups on each tab, = 20tabs x 5subgrups x 40tags per subgrup x around 10 controls per tag = 40000 controls) but only a few of them are going to be showing in the front panel since most of them will be out of view. 

 

It's there any way I can handle this number of controls, considering I only need to visualize some of them at a given time ?? I have developed a sistem to expand, collapse, scroll up and down and stuff with the controls and it works fine with just a few tabs and subgrups but... I would prefere to stick up with this number of controls, to offer the capacity to expand the tags handled by the program while running, i could go down to a more situable number of controls like (16 tab control grups x 3 subgrups x 20 tags x 10 controls = 9600) wich is still a lot to be honest but I dont undersand why I cannot just have the controls lying on the fron panel doing nothing lags this much.

How to get any control reference?

$
0
0

Hi everyone,

 

I want to get any control's reference when click the mouse button on any control.(Front Panel includes hundreds of different types of control.) Actually, I found method using "register for event:mouse down value source". This solution is fine working.

 

reference.png

But I don't want to use this method. Please Can you suggest any other method ?

 

Thanks for answer...

 

labview + proteus + ccs

$
0
0

help me, please ! i'm connecting labview to MCU by virtual terminal . i use pic 16f887 to transmit data from MCU to labview, MCU transmit 12 datas regarded as 12 channels. but there are still errors. i simulate on proteus , write code on ccs.q3.pngq1.pngq1.pngq4.png

Still bad at regex

$
0
0

Can someone help me with this. I just need to find the first line in a file that doesn't start with, for simplicities sake, a.

 

I thought this would do it but it's not working.

 

^[^a.*\n]

Can I set the Increment/Decrement to not visible by default?

$
0
0

The Increment/Decrement attachment to ALL the Numeric controls is a nuisance.  Give me a palette that does not have the Increment/Decrement visible by default and my life will be MUCH better.  I would not mind clicking on a check box if it was needed. 

 

How can I make it NOT visible by default?


Dynamic Mapping of Varying Instrumentation

$
0
0

Hi all,


The Problem:

I want to run the same software on machines with different hardware without any changes to the VI's.  Rather, I'd like to use a config file to map universal commands to the appropriate relays at run time. 

(Unfortunately I am not able to pull screenshots or anything off of my platforms, and my development computer doesn't have any PXI cards it's tough to get a screenshot but I'll explain this as best as I can.)

PXI1 cfg: (16 channel relay in slot 2) 
======================================
Relay1 : 2-1 ... Relay 16: 2-16 PXI2 cfg: (8 channel relay in slots 2 and 3)
======================================
Relay1: 2-1 .... Relay8: 2-8 Relay9: 3-1 .... Relay16: 3-16

So when a script says "Close Relay 9" the user doesn't care the physical location of that relay.  In PXI1 the 9th relay in Slot 2 will close and in PXI2 the 1st relay in Slot 3 will close.  At that point it's just simple mapping.

Where I hit a snag when my system has 2 power supplies controlled by GPIB, 2 power supplies that are controlled over RS232, 3 PXI relay cards, 16 relays controlled by Digital Outputs, 16 channels of analog inputs, and god knows what else. 

If anyone knows an elegant solution that'll allow tasks to be created and mapped at run time, that'd be wonderful.

Things I've Tried:
-Using MAX to name each relay, input, output, PSU, etc.
If there was a way to programmatically do this, I'd maybe go for it but given the sheer amount of tasks I'd need to create it'd be a nightmare.

-Opening DAQmx/TCP/Serial Task, performing action, Closing task every time action occurs.
While my program doesn't require Real-Time, the amount of overhead is not ideal.  Especially for tasks like AI or RFSA that takes a significant time to create/start/stop/close. 

-After Opening each of the tasks, converting each of the instrument handles"to Variant", clustering them with a string denoting the data type I'd like to convert it back into upon use, and building an array of these clusters.
I'd rather not have to pass this massive array into every subVI I call.  Ideally, since race conditions are a non-issue (since I will only be reading from that array) I could use a Global Variable.... but I try to avoid those if I can.

 


If anyone has any ideas I may be completely overlooking I'd greatly appreciate it.  Would using Classes help?  I'm familiar with C# and other object oriented languages that use classes but I haven't used Classes in LabVIEW.  As usual I'm trying to minimize wiring and clutter where possible.  ANY help would be amazing. Thanks.

~Andrew Wojtkowski

visa read and report certain bytes

$
0
0

Hi,

 

I have a basic serial read and write for a scale measurement. The read string gives me a whole set of data (Name, date, weight, etc.) but I only want to record the final few bytes which are the weight. The other data is extraneous and I am reporting to an excel sheet where only the weight is significant. How would I set up the VISA to only record the final number?

 

Any help is appreciated!

FPGA cRIO Wfm - Semi-irregular FPGA Lag

$
0
0

Hello,

 

I have an application that pulls in analog inputs via the following hardware:

NI cRIO 9030

NI 9220 AI module (SAR timed)

2x NI 9244 AI modules (Delta-sig timed)

 

I am using NI's cRIO Wfm VIs and templates to do the acquisition and I can get it to work in Finite mode, but not in Continuous acquisition mode.

 

The NI cRIO Waveform Reference Library is here.

 

I think my issue might have something to do with the different timing methods of the modules, but I've tried multiple different ways of acquiring and it doesn't fix the problem.

The cRIO Waveform FPGA template says to split the SAR and Delta-Sig acquisition nodes, but this article here says to combine them.

 

I'm not sure what to try next. The FIFO doesn't overflow, the FPGA just starts looping slow, which causes the code the throw an underflow error. If I increase the sample rate and increase the #samples to match, the problem occurs earlier. With static settings, I tracked how many loops it took to occur at one point and it  happens around the same time, but not the exact same number of loops.

 

See attached code snippets to see how I've configured it.

 

Thank you,

 

4-axis stepper control

$
0
0

i have c-RIO 9074, SISU 1004, and 4 stepper motors with drives.

i want to control the position of the end effector using 4-axis control, by pressing switch end effector go to certain position 

Como insertar una perilla en °Tab Control--ARDUINO

$
0
0

Captura.PNGCaptura2.PNG

Como puedo insertar en  tab control,  por separado la perilla en una pestaña y el bolean en otra. 

Viewing all 67113 articles
Browse latest View live