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

Synchronize Movement & Write to file actions in loops

$
0
0

Hello,

Can someone please look at my attached vi and advise me.

I am trying to move a motor for (simplicity) 10 steps with 2seconds wait time while recording the spectrum right after reaching each step.

I tried adjusting the time on wait for millisec function but it keeps just increasing/decreasing the number of written to file spectra which is not correct.

How do I link the write to file to end of each movement correctly (to save 10 spectra only in this case).

Thank you,


Extend HAL with specific methods/parameters

$
0
0

Dear NI community,

let me, please, ask you one more question regarding hardware abstraction layer (HAL) implementation.

 

I am implementing now HAL classes with methods, which have common inputs/outputs. Then, there is API VIs for calling of these methods; and API VIs, as the top-level VIs are called from TestStand/LabVIEW.

 

But the problem comes, when some device needs specific setting/parameter. So, it means, that I have two ways of implementation:
- create new method for generic HAL class, and then implement it in specific device class;
- extend specific device class with the private method.

 

Both of solutions have issues. The first one:
- now, specific device implementations classes would have methods in override what they don't need (not a bit issue at the end, I can leave with that, but it seems for me that it's not so nice solution);
- if existing method needs additional parameter, it's not good to create new method which will do the same, but will have additional input. So, I can implement method of setting up that parameter, and then use it internally in specific device implementation. But, it is difficult to see for the end user, and without proper documentation purpose of that method could be unclear in the future.

 

The second one:
- if there will be private methods, it means, that I need to create APIs specially for them. Thus, LV code/TestStand sequence will contain steps for particular, and not abstract hardware. So in case of instrument change, it will be not enough to init HAL class with proper instance. I will need to remove that specific API call step. If I'll not do it (hopefully, I'm not mistaken) then while running other specific implementations of the class on that device-specific method could cause error (or not?), b/c that method is not common for siblings classes.

 

Is there some third way? And which way is more preferrable, please? Or there is no some strict experience with it, and one should consider it based on the situation?

 

Thank you very much in advance!

 

Sincerely, kosist90

 

logos_middle.jpg

 

JKI VI Tester – useful tool for LabVIEW developer

CLD file d'attente

$
0
0

Bonjour,

 

Je souhaite passer le CLD mais j'aurais une question sur la structure à utiliser.

 

Lorsque je développe un projet en LABVIEW j'utilise une machine à état simple pour gérer mon programme mais au lieu d'utiliser  énum, j'utilise des files d'attentes avec des string pour cadencer mes états que je trouve plus dynamique lors du developpement.

 

Je me demande donc si pour l'examen du CLD je doit me conformer au enum pour les machines à états simple et les files d'attentes pour les producteur/consommateur ou si je peut utiliser les files d'attentes pour une machine à états simple ? 

 

Cordialement

LabVIEW & Multisim Cosimulation using Different Language

$
0
0

hi,

 

I am running LabVIEW 2017 & Multisim 14.1 Cosimulation.

 

If i changed the System language as Tamil (Other than English) and while calling the Multisim file inside the LabVIEW, i am getting the following error. 

 

Error 1097 occurred at Call Library Function Node in SIMX EMI Model Initialize.vi->SIMX EMI Update EMI Node.vi->SIMX EMI Call Choose EMI.vi->SimX.xnodeSmiley FrustratedimX_OnDrop.vi:4250001->SimX.xnodeSmiley FrustratedimX_OnDrop.vi.ProxyCaller

Possible reason(s):

LabVIEW: An exception occurred within the external code called by a Call Library Function Node. The exception might have corrupted the LabVIEW memory. Save any work to a new location and restart LabVIEW.

 

Also while closing the labview, it crashes. 

Expect, LabVIEW & Multisim Cosimulation, mostly all other functions are running smoothly.

 

Could you please someone suggest me the solution to run the cosimulation file other than english ? 

 

Thanks 

 

Thanks & Regards,
Rajasekaran V

Clone an array element a varying number of times

$
0
0

Hello,

 

I am trying to make a vi file that does the following:

1. It accepts a string as an input. The string contains a series of concatenated commands.

2. It finds a command of the type repeat 2 <xxx>

3. It replaces "repeat 2 <xxx>" with "xxx xxx" (e.g. repeat 3 <xxx> would become "xxx xxx xxx"). The markers < and > can be substituted with a different symbol (e.g. [], {}, ()).

4. This happens for all the instances of repeat commands within the string, so that in the end a new string is produced that does not contain any repeat commands.

repeat.png

I attach a screenshot of the program so far, as well as the program itself.

 

I cannot figure out how to use the regular expressions properly. "Repeat [0-9]" does not capture the entire command. I would like to have something like "Repeat [0-9] <*>" where * can be anything, but I cannot figure out how to write this using the regular expressions.

 

Also, is there an elegant way to do what I want using the search and replace string vi?

 

Any help would be greatly appreciated.

Error 1172 occurred at Invoke Node

$
0
0

What makes this a mistake, how can I fix it?
Last week it was still good!

 

Error:

Error 1172 occurred  at Invoke Node System.Reflaction.TargetInvocationException

Inner Exception:

System.InvaidOperationException

Stellaris ICDI USB driver compatibility with Labview

$
0
0

Hi!

 

I have a compatibility issue between Stellaris ICDI USB drivers (on a Texas Instruments EK-TM4C1294XL developer kit) and Labview.  When I try to set the serial communication to 115200 baud I get a warning and it looks like the baud rate remains at 9600.  The following links discuss this issue:

 

Following suggestions from the above links, I was able to update the uController ICDI firmware to the latest version,

but still  experiencing the compatibility (baud rate setting) issue...

 

Thanks for your help!

 

Dar Bahatt

Generate a viberation signal in LabVIEW

$
0
0

Hello

I have been trying to generate a signal which is identical to vibration signal captured from a motor.

The tasks are  -

 

Create a vi to generate a vibration signal and store in for of .dat file.

Create another vi that could read the previously created .dat file and perform FFT, Order analysis.

 

I am unable to do this . Can anybody help ?

 

Thanks,

Nishant


no funciona el labview sin highlight activado

间断波形参数测量

$
0
0

下图所示的波形,该如何图片上所标注的参数:

2017-05-26_201247.png

1,Sound Duty Cycle;

2,Sound Cadence Period;

3,Number of Repetitions;

Problems connecting and reading 2 seperate HP34970

$
0
0

Hello

 

For some reason I am unable to read the 2nd 34970 device. I have added 3 snippets, part of my code.

First is "connection", works fine, no errors.

2nd is ReadFAT, works fine. 3rd is ReadCal where I get error -1073807298.

If I swap the comports in the "connection" state, ReadCAL works and ReadFAT does not, making me sure it is not a connection issue.

Connection to instruments seems to be working ok, just not at the same time. The code in  ReadFAT and ReadCAL is copied, should be the same.

I am running out of ideas, is there something I am missing?

 

I am using virtual comports on 2 separate Ethernet Nports if that makes a difference.

Windows server 2012 r2

Tried both LV 2016 and 2017, same problem.

 

Appreciate any input.

 

Graph palette has a property node ?

$
0
0

Hi,
I can display all these palette graph functions in a row And control each one separately ?

Untitled.png

thank you ,

Data transfer strategies for FPGA-RT-Host

$
0
0

Hi all,

 

I have a question about high level system design with FPGA-RT-PC. It would be great if I can get some advice about ideal approaches to move data between the 3 components in an efficient manner.

 

In my system, I have the FPGA monitoring a channel of a digitiser and deriving several data streams from events that occur (wave, filtered data, parameters etc). When an event occurs the data streams are sent to the RT through a DMA FIFO in U64 chunks. Importantly, events can be variable length.  To overcome this, I reunite the data by insert unique identifiers and special characters (sets of 0's) into the data streams which I later search for on the RT.

 

Because the FPGA is so fast, I might fill the DMA FIFO buffer rapidly, so I want to poll the FIFO frequently and deterministically. I use a timed loop on the RT to poll the FIFO and dump the data as U64's straight into a FIFO on the RT. The RT FIFO is much larger than the DMA FIFO, so I don't need to poll it as regularly before it fills/

 

The RT FIFO is polled and parsed by parallel loop on the RT that empties the RT FIFO and dumps into a variable sized array. The parsing of the array then happens by looking for special characters element wise. A list of special character indices is then passed to a loop which chops out the relevant chunk and, using the UID therein, writes them to a TDMS file.

 

Another parallel loop then looks at the TDMS group names and when an event has an item relating to each of the data streams (i.e. all the data for the event has been received), a cluster is made for the event and it is sent to the host over a network stream. This UID is then marked as completed.

 

The aim of the system is to be fast enough that I do not fill any data buffers. This means I need to carefully avoid bottle necks. But I worry that the parsing step, with a dynamically assigned memory operation on a potentially large memory object, an element wise search and delete operation (another dynamic memory operation) may become slow. But I can't think of a better way to arrange my system or handle the data. Does anyone have any ideas?

 

PS I would really like to send the data streams to the RT in a unified manner straight from the RT, by creating a custom data typed DMA FIFO. But this is not possible for DMA FIFOs, even though it is for target-scoped FIFOs!

A simple CCP practice encountered a problem

$
0
0

Hi,professional, I am using ECU Measurement and Calibration Toolkit to make a simple VI, to build a basic concepts about CCP on LabVIEW,but I failed.belows are the phenomena.

ccp-demosimple.jpg

My HIL 's  collocations are as follows:

 hil配置.jpg

,attached VI is my source code, with Lab 2012.

toward the ECU wanna to be connected,my

CRO is 0x009,

DTO is 0x089,

station address is 0,

boudrate is 500k,

byteorder and CMD order are not sure,

A2L file is available

 

What should I do? Any advice will be appreciated,thank you all

 

Slow front panel

$
0
0

Hello ererybody!

First of all, thanks for reading my message.

My VI was working susscessfully. I changed the front panel themes of my program and right now the program works slow. Could be the problem for this change?

Thanks in advance.

Iván


DAQmx Sound Pressure Measurement

$
0
0

Hello,

 

I would like to measure the sound pressure level from a variable speed compressor. Using DAQ NI9234, I measure the analog inputs Sound Pressure and Voltage (0 to 5 V) for compressor running speed. My labview program gives trouble, recording both the signals simultaneously. Can anyone help me with this?

 

Thanks,

Deepika

Building many products and packages with VIPM

$
0
0

Hello,

 

I'm building a software product that is growing and this with VIPM. The build process in VIPM is easy and thus a bit limited to what I can get out. I'm listing the hierarchy of what I get and what I want. When I select to have a Custom Category I can put my Company name here and get a nice palette where I can install all my packages. However, I do want another subdirectory so that I can have a product built up of several packages and they would show under one product family under my company name category. Now all my builds just gets flat under the company name category. I've tried a few things for example to name the Product Name the same for those I want in the same folder, but this results in several subpalettes with same name but different vi's within.

 

Any suggestions?

 

What we get

Addons

Company name (custom category)

Product Name 1(name of Functions palette for seperate package)

Func.vi

Func.vi

Func.vi

Product Name 2(name of Functions palette for seperate package)

Func.vi

Func.vi

Func.vi

Product Name 3(name of Functions palette for seperate package)

Func.vi

Func.vi

Func.vi

 

What we want

Addons

Company name (Customer Category)

Product Family name (folder for other packages to be installed in)

Product Core name 1(name of Functions palette for seperate package)

Func.vi

Func.vi

Func.vi

Product addon name 2(name of Functions palette for seperate package)

Func.vi

Func.vi

Func.vi

Product addon name 3(name of Functions palette for seperate package)

Func.vi

Func.vi

Func.vi

Product Family name 2 (folder for other packages to be installed in)

Product Core name 4(name of Functions palette for seperate package)

Func.vi

Func.vi

Func.vi

Product addon name 5(name of Functions palette for seperate package)

Func.vi

Func.vi

Func.vi

Product addon name 6(name of Functions palette for seperate package)

Func.vi

Func.vi

Func.vi

sound

$
0
0

Mr.KrisnaWisnu 

izin bertanya kak,, bagaimana cara menampilkan perbedaan sinyal suara kita dengan orang lain dan juga memakai proses FFT . disini saya menggunakan input suaranya yaitu sensor suara dan memakai interfacenya arduino.. mohon bantuannya terimakasih 

                    
 

Documenting the sequences for generating a State machine

$
0
0

While doing code for large and involved machine sequences, I normally use the Queued state machine. Just create a TypeDef for the states and keep shifting through them ... all well.  Have created many such machine codes to date.  But the catch here is ... in all these cases I used to do the code and I am also the designer of the hydraulic controls for the machine. So generally I can "think"  out the whole sequence in mind and do it step by step converting mind ideas to LV code. 

Now as part of a new project requirement I need to create a full sequence flow chart for someone else to do the LV coding.  I am stuck !!

I tried doing it via a Flow chart but it was getting too large for comfort and the branches were too many. And indicating concurrent tasks ( outside of the QSM ) like temperature regulation, motor speed stabilization etc make it complex. 

Tried to get sequences into a Excel spreadsheet but soon realized its futile. 

So as of now I am advising the engineer small incremental steps to code and its happening. 

But I am sure there is a better way to do this documentation in such a way that someone else can refer to it and start coding. Also is the fact that when we try to document, we are loosing a MAJOR advantage of the Graphic Coding like LV ..??

 

Any ideas as to how this is done ?? 

Events not visible in DSM or logged in Citadel

$
0
0

I am setting up a test rig with a number of ADAM 4018+ modules, which I connect to Labview through a Modbus I/O server. Datalogging works fine - I can read the Citadel database in MAX and export it to text. I cannot get it to log alarms though. The modules I'm working with give a Boolean error signal when they do not detect a thermocouple at one of the inputs. Following the instructions in the Getting Started document (Getting Started with the LabVIEW Datalogging and Supervisory Control Module), I am trying to view the alarms by following the procedure:

1. Select View»Alarms and Events to display the Alarms and Events view.

2. Click Select Processes to display the Select Processes dialog box.

3. In the Available Processes list, expand My Systems»localhost.

4. Select Tank System Shared Variables and click Add to add this process to the Selected

Processes list.

5. Click OK to close the Select Processes dialog box.

But I cannot see them. Alarming seems to be set up correctly because when I unplug a thermocouple DSM does display the High value of the Boolean in red and says there's an error. But the alarm does not appear in the Alarms and Events view and is not logged to the Citadel database I created for datalogging. In fact, the database is completely empty when viewed in MAX. Logging events to the same database as data doesn't work either. I tried deploying the libraries using the Deploy Library VI, but that did not fix the problem.

Viewing all 69241 articles
Browse latest View live


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