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

removed random amount of extra spaces from string

$
0
0

Hello i am getting a string input that sperates a data table with a random amount of spaces. 

Is there a way to replace All space sequences with a single space ?

 

e.g.

 

CPU        MEM  PID

15.689    12.2   6610

21.8         156    6611

 

(so the spaces are random)

 

I have ried replaces double spaces with single spaces a total of 8 times in succsession but for some reason that is also removing (some) single spaes as well and im not sure why.


resize front panel array single columns

$
0
0

I have a bunch of columns on my front panel and some of them contain lon strings while others only have a max of 2-3 character strings in them.

I am looking for a way to resize each column without resizing all the others at the same time. If i have them all the same lengh and the lengh of the max string i get the array is far too large to fit on the screen space availble and navigating labview VI leaves a lot to be desired.

 

Its purly cosmetic but would help me see information clearer, and since the information is all locked up in the long strings its not going to work well with what im doing next.

Building a waveform from a binary array and and sometida noise

$
0
0
Hi everybody

I've got a binary array 1&0 and I want to build a waveform from it, each pulse with a 500 ms interval adding some noise, how can i get it?

Labview version 2010


Thanks

PIC

$
0
0

Saludos a todos tengo un problema, no puedo enviar ni resivir datos estoy usando windows 8.1 y LabVIEW2014 para realizar el control de un motoreductor de cd usando una tarjeta PIC-SERV SCv1 y para la comunicacion USB con LabVIEW la tarjeta SSA-485v2, ambas de JrKerr en su sitio web encontre la libreria para labVIEW, corri la funcion PIC-SERVO TEST pero inmediatamente al correr el programa me aparece un error es el siguiente:

Run program.jpg

Tengo conectado el USB y lo detecta como COM3 revise las demas conecciones en el hardware y estan funcionando revise el Measurement & Automation Explorer y me arroja error para LPT1 ver

ErrorPORT.jpg

para mas detalle encontre: Error.png

instale el driver par la tarjeta SSA-485 pero no encuentro cual es la falla. Alguien tiene alguna referencia o idea de como soluconar este error o algun consejo se los agradesco

 

 

 

the stop button is not responding when i needed to stop a program

$
0
0

i want my program of labview to stop when i press stop button but it is not happening....stop button is not working....i have used one while loop in which there are event structure n some case structures.....i have attached my file...so plz help me..

Rather Long Execution Time for Release Queue.vi

$
0
0

Hi,

 

I'm trying to understand a (at least for me) weird behaviour with the execution time of the Release Queue.vi.

 

First fo all, this is what I'm doing:

In my application, I'm using queues to communicate with two asynchronous VI clones. They are started using Open VI Reference.vi (Option 0xC0). One of the asynchronous VIs Input terminal is a queue reference. A seperate queue is created for each clone in the TopLevel VI and passed when invoking the asynchronous VI.

Starting the first async clone takes some time, the second one starts quite immediately (I guess that's because the VI has already been loaded, which is no problem) After having started the VI, the VI Server ref to the VI gets closed, since it is not needed anymore.

The async VI is implemented to terminate itself when the queue reference is released. This is something, I would call standard procedure; it's also working without any problems.

But here comes the strange thing: when terminating one of the clones by releasing the queue, the Release Queue.vi executes immediately. When releasing the remaining one, the Release Queue.vi  takes about a second to execute.... independently of the Force Destroy Option setting.

I would have expected the Release Queue.vi to execute just as fast as the first one.

 

Can anyone explain this behaviour? I'm using LV2013SP1f5

 

Thanks a lot!

Oli

 

 

 

 

 

FP Bounds when Maximized

$
0
0

LV2013, Win7

 

My app has several non-modal windows, some of them resizable.

 

When the app shuts down, I want to save the position and size of these windows and restore them the next time it starts up, so that things are just as you left them.

 

I convert the FP.Bounds into a string, and save that in an INI file.

 

My customer wants to remember whether the window is MAXIMIZED or not, and restore it that way if so.

 

I realize that there is a FP.STATE property that I need to pay attention to, but I'm looking at something else first.

 

Here's a scenario, where I CLOSE the window BEFORE I read the BOUNDS.

 

I open this window.

 

I set this window to minimum (500x150), and by eyeball, put the top left of the panel in the center of my screen (about 960x540)

 

I shut down.  The position is saved as "L=942,T=506,R=1442,B=656".

 

I start up again.  The window is restored to the same place.  Great.

 

I then MAXIMIZE the window, and shut down.

 

The position is saved as "L=2,T=46,R=502,B=196".    

 

Why?  it stored the new TOP LEFT, but left the SIZE where it was ? ? ?

 

According to the help text. "If the panel is not open, this property returns the bounds in the posiition in which it was last saved".

 

Since I'm dynamically opening a reentrant clone, there is no "last saved" position.

 

Anyway, I tried forcing the FP.CLOSE to occur AFTER the BOUNDS are read.

 

Here's the same scenario:

 

I open this window.

 

I set this window to minimum (500x150), and by eyeball, put the top left of the panel in the center of my screen (about 960x540)

 

I shut down.  The position is saved as "L=926,T=500,R=1426,B=650".

 

I start up again.  The window is restored to the same place.  Great.

 

I then MAXIMIZE the window, and shut down.

 

The position is saved as "L=2,T=46,R=1918,B=1078".    

 

OK, so that's maximized.  

 

But the trouble is, I've lost the original position/size.  If I unmaximize this, there's no where to go - there is no other size to return to.

 

It just removes the border pixels and the thing is still full screen.

 

I don't want to have to record all the maximizing operations, and the bounds before and after.

 

If I try this with MINIMIZED, the BOUNDS don't change - the BOUNDS specify where it would be if you un-minimized it.

 

But that's not true for MAXIMIZED.

 

I suppose that I have to do this:

 

Record FP.STATE (Maximized, Minimized, Standard, Closed)

If state = Maximized

    Set State to Standard

Record FP.Bounds.

 

It looks like that would restore the bounds from wherever they are stored while maximized.

 

QUESTION:  Is there a better way?  Is there a way to get to those stored bounds numbers without unmaximizing the window while I'm shutting down?

 

 

 

 

I am trying to read array of values using OPC URL . But when i read it, it works correctly for 3 times but after that the values starts toggling. What should i do to rectify the errors. Herewith i have attached my code.


Interrupting sequence structures

$
0
0

Say, for example, I have a case structure with two cases. In each case, there is a sequence structure. If case 1 is true and the program is running that particular sequence, would switching to case 2 immediately cut off the sequence from case 1 and leave it incomplete in favor of executing the sequence from case 2?

FPGA compile error

$
0
0

 I am getting error from this perticular FPGA VI while compiling. The FIFO I have configured in my project and I'm sending the data from other place to this FIFO. The error while compiling says -

 

Elaborating entity <NiLvFxpEnableHandlerSlv> (architecture <rtl>) with generics from library <work>.
ERROR:HDLCompiler:1566 - "C:\NIFPGA\jobs\si944sF_B3D8t4R\NiFpgaAG_Y_Phase_Sine_dash_Cos.vhd" Line 301: Expression has 8 elements ; formal cdata expects 9

Elaborating entity <NiFpgaAG_00000004_CustomNode> (architecture <rtl>) with generics from library <work>.
Execution of entity nifpgaag_00000004_customnode failed
Netlist NiFpgaAG_Y_Phase_Sine_dash_Cos(vhdl_labview) remains a blackbox, due to errors in its contents
-->

Total memory usage is 191384 kilobytes

Number of errors : 1 ( 0 filtered)
Number of warnings : 12 ( 0 filtered)
Number of infos : 0 ( 0 filtered)


Process "Synthesize - XST" failed

 

 

I'm compiling it for cRIO 9082 in LabVIEW 2013.

 

any help?? How can I understand what is there in "line 301" !!

Start Async Call Brutal Typedef Bug

$
0
0

This is a nasty bug that I think is the cause for a lot of weird anomolies I'm seeing with user events, like where some don't get fired and if I probe the event refnum on a VI that was launched using the start async call node I get some weird value for the reference like 8450 or 5500 instead of some typical large integer. It also doesn't match the value I get when I initialize the reference. This happens only intermittently but I can reproduce the bug I am seeing on a smaller scale to some extent. It is not the exact same as what I am seeing in my actual project but I guarantee the two are related. I am also fairly confident this has to do with using LVlibs as well.

 

So...to reproduce some issues:

 

Unzip the attached code and open the project

Open Main.vi. It is hard to see because it's pink, but notice the coercion dot on the start async call node. This is expected at this point because I have a non-typedef cluster on the connector pane, but a TD cluster wired into it.

Now, open AsyncCall.vi

Drag the eventcluster.ctl from the project onto the front panel of the asynccall.vi

Ctrl+x on the typedef cluster that you just placed on the front panel

Select the non-typedef cluster by clicking on it

ctrl+v to replace the non TD cluster with the TD cluster and save

Go back to main.vi, notice the coercion dot didn't go away.

Open context help and notice that the ctrl types match, but it's like LV doesn't recognize this on the start Async Call node.

Delete start async call node, then replace it. Wire the cluster back up. Voila, no coercion dot.

 

Second issue -- same result but different method to get there.

 

Now that you have typedef connector panes matching and no more coercion dots because you've gone through the first steps of this "exercise", pull the EventCluster.ctl out of the library and save.

 

WOAH, look the coercion dots back, because the start async call node is still referencing the typedef cluster that it thinks should be under the library. This can be seen by deleting the cluster on main.vi then right clicking the start async call node on the connector pane and creating a new cluster constant

 

It's creates a greyed out control! Why? Well, let's open context help again. Whadda ya know, it's still looking for the control in Bug.lvlib which no longer exists.

 

 

Now, the issue I'm having in my full project which I can't post and can't reproduce on a smaller scale is updating the typedef causes the coercion dot. This means I cannot update my typedef cluster that contains all my events without going and replacing EVERY SINGLE start async call node EVERY time I add a new event. 

 

Major problem.

 

Please let me know if these steps to reproduce were not clear or you have trouble reproducing the issue. I am using LV2013 SP1. I opened the project in 2014 to see if it was resolved in a later version but saw the same thing.

double-clicking on a probe on a clone should bring you to THAT clone, not some OTHER clone

$
0
0

I have two pre-allocated clones. I probe the same wire in both of them. I go to the probe watch window and click on the first probe.

 

At this point, one would expect and hope that the probe-watch window would send me to the wire corresponding to that probe. Instead, it sends me to the probe on the same wire in the other clone.

 

Rather than repeating the unprintable response I gave upon discovering this, I will just say, DO NOT WANT.

Modbus with motor drive

$
0
0

Hi,

 

I was connecting Labview with an Altivar 31 AC motor drive using modbus.

 

It worked fine but I realized that according to drive datasheet a register 9096, for instance, appears to be read by Labview in the address 9097.

I do not know why all the registers appeared one position delayed according to datasheet.

 

Could anyone help me?

high output audio

$
0
0

Not really a LabVIEW question, but I am hoping to find a unit that is LabVIEW controlled that can put out a +/- 15V p-p into a 5 ohm load, partly reactive, partly resistive. From 20Hz to 40KHz..Any thoughts, experiences?

 

Thanks,

 

how to manually give input to the visa read.??

$
0
0

I want to manually give input to the visa read,so that visa read can take a  one byte at once.

I am not able to get the data from the microcontroller through the Rs232.so I want to manually give input to the visa read.so that I can check my programme.Is it possible to manually give input .??

Thanks.
I have attached my labview programme.


Error -201025 Amplitude Swept

$
0
0

Hello,

 

I am currently running a NI USB 6259 DAQ board connected to my device under test (DUT), I have been able to get the swept sine program from NI working however I am currently now working on amplitude swept now to keep constant frequency and vatry excitation. My hardware is connected to a windows 7 Dell optiplex 9020 which connects my DAQ power amplifier ans electrodynamic shaker (Sinocera Modal Shaker JZK-5). 

 

When running the program I encounter the error: Error -201025 occurred at DAQmx Control Task.vi:3900002

 

Possible reason(s):

Non-buffered hardware-timed operations are not supported for this device and Channel Type.

Set the Buffer Size to greater than 0, do not configure Sample Clock timing, or set Sample Timing Type to On Demand.

Task Name: _unnamedTask<7F>

 

However when stepping through the program individually I encounter the error: 200088.

 

I possibly beileve the hardware is is not communicating with the assigned task channels; I have also attached the code of where the problem occurs, committing AI and AO tasks through DAQ mx

 

Does anyone have possible solutions or encountered this before

 

Your help is mot appreciated 

 

Regards Tanju

Problem in acquiring data from Meriam MDT500

$
0
0

We developed an application for taking data from Meraim Device MDT500 through USB port in our Windows 7operating system based computer.  We are reading Differntial Pressure Temperature and Mass flow rate from this device. We are getting all the data in our development system and in two more systems in our works. When we installed the executable file in the customer's system (With Windows 8), we get Differential Pressure, Internal temperature but we did not get Mass Flow rate. The Mass flow VI is using .NET object . The screen shot is attached herewith.

We have installed .NET4.5 in the Machine. Do we need some other version of .NET ? Please help.

filter vibration measurements

$
0
0

Hello,

 

I'm using labview 2013 with sound and vibration suite

 

I use a tri-axes accelerometer, catch the accelerations, integrate the signals, filtrate them to keep frequencies between 10Hz and 1kHz and compute global speed vibration (RMS).

 

But my code doesn't work properly, the global speed vibration is incoherent (to high compared to acceleration values in input)

 

On some other acceleration signals, an FFT of the filtrated speed shows high amplitudes outside [10-1kHz] which should be filtrated, so the global speed vibration (RMS) is still too high

 

I think it is due to the filter which amplify border frequencies at high order.

 

How can I solve this ?

 

Many thanks in advance

cRIO loss of cummunication

$
0
0

This is an inquiry regarding Communication fault issue between cRIO and PC
1. We have used cRIO 9047 version with TCP/IP communication and have used LabVIEW 8.6
2. Recently we did PC replacement and upgraded LabVIEW as 2012 version. But still using cRIO 8.6 without any modification.
3. What I want to ask you is, After PC replacement, I’m experiencing disconnection of PC communication between PC and cRIO frequently.

 

 

So I'd like to ask any solution regarding this issue in case that you have any warranty experineces to solve this

word genneration toolkit

$
0
0

Dear All

 

I made app for test bench and i'm building an Word Report.The applicatin works fin on my PC and on one old LAPTOP  When I build the VI on another PC i Receve the following error

 

"NI_Word.lvclass:new report subVI.vi -> NI_report.lvclass:New Report.vi -> Administratorski panel STEND 2.vi" and the word file can't generate. Does anyone have any idea what may be causing this problem?

Untitled.jpg

 

Viewing all 67335 articles
Browse latest View live


Latest Images

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