Sinus bereichsweise auswerten
Hallo
Ich habe
als Winkelsignal eine Art Sinussignal mit drei Schwingungen über ±500° sowie
eine Drehmomentkurve. Aus diesen zwei Kanälen muss ich vier neue Kanäle machen.
Ich brauche jeweils die Werte des Drehmomentkanals bei sinkender Flanke des Winkelsignals
im Bereich von +450° bis -450° und die zugehörigen Winkelwerte als neue Kanäle
sowie die Drehmomentwerte bei steigender Flanke des Winkelsignals im Bereich
von -450° bis +450° und die zugehörigen Winkelwerte als neue Kanäle. Auf der
beigefügten Grafik sind die für mich interessanten Bereiche markiert. Ich
kriege jedoch keine vernünftige Schlaufenstruktur hin, die mir dies ermöglicht.
Kann mir da jemand weiterhelfen?
greez siipo
Attachments:
frage_sinus.jpg 67 KB
Hallo Siipo,
sicher gibt es mehrer Ansätze zur Lösung dieser Aufgabe.
Man kann in einer Schleife zeilenweise den Winkelkanal betrachten und je nach steigender oder fallender Flanke den Drehmomentwert in den einen oder anderen Kanal kopieren. Eventuell muss noch ein X- Wert mitbewegt werden, auch wenn die Screenshot so aussieht, als würden Sie diue Kurven über ihrem Index betrachten.
Zur Erkennung der Flanke des Winkelkanales empfehle ich, diesen abzuleiten - man erhält positive und negative Werte bei Flanken, sowie 0 in der Ruhephase, die ja nicht mitkopiert werden soll. Nachteil dieses zeilenweisen Ansatzes könnte die Bearbeitungsgeschwindigkeit sein. Bei sehr langen Kanälen macht es sich bemerkbar, wenn man jeden Wert einzeln betrachtet.
Eine zweite Variante beginnt auch mit der Ableitung, jedoch setzten Sie nun den Tachenrechner ein, um neue Kanäle zu erzeugen, mit der CTNV Anweisung und einem geeigneten Vergleich können aus dem Zielkanal zum Beispiel alle Werte ausgeblendet werden, bei dem der Winkel nicht steigend ist. ch("neu") = ctnv(ch("Ableitung")<=0)+ch("original"). Diese Operation geht schneller als die zeilenweise Auswertung. Die NoValues im Zielkanal können im nächsten Schritt mit der ChnNovHandle Funktion eliminiert werden.
Ich hoffe, diese Hinweise können Ihnen weiterhelfen
Ingo Schumacher
Systems Engineer Sound&VibrationNational Instruments Germany
Similar Messages
-
How do I make a sinus graph GUI
Hey! Anyone know how a script that easily makes a sinus graph using GUI. I use Eclipse as editor!
Using JFreeChart
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.*;
import org.jfree.chart.*;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.plot.XYPlot;
import org.jfree.data.xy.*;
import org.jfree.ui.*;
public class SinChart extends JFrame
public SinChart(String s)
super(s);
XYDataset xyDataset = createDataset();
JFreeChart jfreechart = createChart(xyDataset);
ChartPanel chartpanel = new ChartPanel(jfreechart);
chartpanel.setPreferredSize(new Dimension(800, 400));
setContentPane(chartpanel);
private static XYDataset createDataset()
XYSeries sinSeries = new XYSeries("Sin");
XYSeries cosSeries = new XYSeries("Cos");
for (double x = 0.0; x < 720; x += 10)
sinSeries.add(x, Math.sin(Math.toRadians(x)));
cosSeries.add(x, Math.cos(Math.toRadians(x)));
XYSeriesCollection seriesCollection = new XYSeriesCollection();
seriesCollection.addSeries(sinSeries);
seriesCollection.addSeries(cosSeries);
return seriesCollection;
private static JFreeChart createChart(XYDataset xydataset)
JFreeChart jfreechart = ChartFactory.createXYLineChart("Sin Curve Demo", "Angle (Deg)", "Y", xydataset, PlotOrientation.VERTICAL, true, true, false);
jfreechart.setBackgroundPaint(Color.white);
XYPlot xyplot = (XYPlot)jfreechart.getPlot();
xyplot.setBackgroundPaint(Color.lightGray);
xyplot.setDomainGridlinePaint(Color.white);
xyplot.setRangeGridlinePaint(Color.white);
return jfreechart;
public static JPanel createDemoPanel()
JFreeChart jfreechart = createChart(createDataset());
return new ChartPanel(jfreechart);
public static void main(String args[])
SinChart sinCosChart = new SinChart("Sin & Cos Curve Demo");
sinCosChart.pack();
sinCosChart.setVisible(true);
}If this is homework then I bet this solution is not acceptable to the person marking the homework! -
Hi,
I need help in splitting signal generation. I want to generate sinus signal, for example sinus with frequency 0.1 Hz. Means, it would take 10seconds to generate simply 1cycle. The problem is, I want to generate the signal with NI DAQmx and NI HSDIO. These devices has buffer.
I need to split my signals into smaller pieces, let say, 0.5 seconds pieces so I can generate the signal continuously and get my full cycle after 20x iteration.
How can I do that??
regards,
Yan.Mystogan wrote:
I need help in splitting signal generation. I want to generate sinus signal, for example sinus with frequency 0.1 Hz. Means, it would take 10seconds to generate simply 1cycle. The problem is, I want to generate the signal with NI DAQmx and NI HSDIO. These devices has buffer.
I need to split my signals into smaller pieces, let say, 0.5 seconds pieces so I can generate the signal continuously and get my full cycle after 20x iteration.
How can I do that??
HSDIO is not relavant for analog signal generation, it is High Speed Digital (say TTL) Input Output.
What device (other than HSDIO) you have? Also you have not mentioned the update rate required?
Now considering the Output FIFO Size, you can probably choose analog output generation in regeneration mode with dynamically updating user buffer data.
The bottleneck in the signal generation will be, to update the output buffer (that is to transfer next set of samples, to be generated, from PC/software buffer to onboard [hardware] buffer), Relative to & Offset property nodes will play important role.
I am not allergic to Kudos, in fact I love Kudos.
Make your LabVIEW experience more CONVENIENT. -
Can i generate two sinus to delay in phase in continue with the ni 6052E PCI
I want use the daq ni 6052 E in sinus generator
Channel 1 sin(x)
Channel 2 sin(x+pi/4)
continus generation without hole
How must I do
do it exist a VI
can you send me
Thank youGreetings,
Below is a link to a LabVIEW example that should accomplish the task you have described:
Generating Sine Waves Continuously on Two Analog Output Channels
Good luck with your application.
Spencer S. -
Problème d'échantillonnage de sinus et cosinus
Bonjour à tous,
débutant en labview et étudiant en électronique, j'ai une question dans un tp que je n'arrive pas à traiter.
Voici la question :
"créer un tableau contenant N valeurs de la fonction sinus pour des valeurs d'angle comprises entre 0 et 2*P, P étant le nombre de périodes , N P et l'amplitude A sont fixes depuis la face avant. Tracez la courbe à la fonction graphe".
a) tracer en fonction du nombre de points
b)tracer en fonction de la valeur de l'angle. Il faut alors créer un Cluster grâce à la fonction assembler.
ce que j'ai fait ci-joint
Merci de votre aide
Cordialement
Arnaud M.
PS : je pars en vacances demain, je ne pourrais vous répondre que lundi dans une semaine
Résolu !
Accéder à la solution.
Pièces jointes :
sinus en fct points.vi 13 KB
sinus en fct angle.vi 14 KBBonjour,
Je suis tout à fait d'accord avec Ludovic. Notamment, si il s'agit d'un TP, c'est probablement que vous avez eu les leçons nécessaires pour le faire.
Quel est votre problème exactement? Qu'est-ce qui vous semble ne pas aller dans votre exemple? Qu'est-ce que vous n'arrivez pas à faire?
J'aurais quelques questions par rapport à votre exemple:
- Quel est le but du tableau initialisé?
- Etes-vous sûr qu'il est bien initialisé? (regardez l'aide, et l'aide contextuelle (CTRL+H))
- Savez-vous à quoi servent les informations que vous avez utilisé pour créer un Cluster à afficher dans le graphe?
- Après, je ne sais pas si cela fait parti de votre exercice ou pas, mais je pourrais vous conseiller de regarder la palette de fonctions "Traitement de signal", vous pourriez y trouver des fonctions intéressantes pour la création de sinus.
Cordialement,
Olivier L. | Certified LabVIEW Developer -
Puis je generer 2 sinus retardees en continu avec la ni 6052e
J'utilise un carte ni 6052e
voie 1 sin(x)
voie 2 sin(x+t)
Les deux voies sont generees en continu sans trou
Si la carte peut generer ces signaux
existe t'il un vi
pouvez vous me le transmettre
MerciBonjour,
Cette carte peut generer deux signaux analogiques simultanement.
Tu dois d'abord creer les tableaux de points representant les sinus puis les entrelacer (1er point signal 1, 1er point signal 2, 2e point signal 1, ...). Les signaux doivent avoir le meme nombre de points.
Pour generer les signaux, tu peux choisir dans la palette le vi AO Generate Waveforms en utilisant les voies analogiques 0 et 1. -
Arrêt génération sinus en fin de période
Je souhaite avoir une solution pour arrêter ma génération de sinus sur une carte génération PCI 6713.
Je génére avec un échantillonnage 'continu' et lorsque je demande l'arrêt de la génération : je voudrais que celle ci ne se fasse qu'en fin de période (dernier point de la période et pas n'importe où au milieu de la période !)Hi Laurina,
My French isn't that good, and I don't know too much about DIAdem-DAC, but I'll try to help by adding a rough translation of your request, in the hopes that more DAC-knowledgeable folks in Europe will be able to answer your question. Here is what I think you asked:
You need to be able to stop the continuous generation of a sine wave being output from a PCI 6713, and when you require the generation to stop you want it to do so at the end of the next full period as opposed to the exact point in the output sine wave when you gave the stop signal. Is that right?
Clarifying question back to you: Are you giving the stop signal by pressing a button in VISUAL or by some trigger signal?
Hope that helps,
Brad Turpin
DIAdem Product Support Engineer
National Instruments -
High frequent sinus tone from screen
Sometimes I can hear a “not very dramatic” high frequent “sinus” type of sound, coming from the iMac`s screen. Sometimes it occurs when “altering visual graphics”. For example, when opening Safari, or other applications. 10 minutes ago, I heard the sound. Right now, having two different active programs on my desktop, like Safari and Word, the “sinus tone” is gone.
I`ve heard this sound on older television sets, but I don`t have a clue of what it could be. No disaster, but I wonder: Is this normal?
Thank you,in advance.AppleCare's Express Lane. Do note that if you're within 50 miles (80 KM) of an Apple repair station, you're eligible for onsite repair since yours is a desktop machine.
-
Lissage sinus par méthode moindres carré
Bonjour.
Je voudrait pouvoir déterminer le déphasage ainsi que l'amplitude d'un signal sinusoidale bruité (par rapport à un signal que je génère moi meme) afin de calculer plus tard la capacité et la résistance équivalent d'un système à caractériser.
Pour cela j'ai pensé d'utiliser le VI " Ajustement de courbes" avec le modèl linéaire moindre carré.
J'arrive assez bien à trouver l'amplitude ainsi que l'offset du signal sinusoidale mais je ne comprend pas comment lui dire de rajouter une variable à calculer (le déphasage).
J'ai d'abord pensé à écrire : sin(x-a2) pour qu'il me trouve le parametre a2 qui correspond le mieux mais il me met "modèl non valide".
Bref je n'arrive pas à trouver le déphasage de mon signal avec cette méthode. Est ce que c'est possible quand meme?
J'ai mis le programme de test que j'ai fait en pièce jointe pour mieux visualiser le truc.
Merci beaucoup de votre aide.
Bonne Journée.
Julien
Pièces jointes :
fit du sinus.vi 295 KBBonjour Julien,
Je ne pense pas que tu puisses effectuer un calcul de phase à l’aide du VI « Ajustement de courbes » car ce VI ne présente qu’une entrée signal alors qu’il te faut 2 signaux pour calculer une phase.
Tu peux connaitre le délai entre deux signaux périodiques en réalisant la corrélation croisée de ceux-ci (dans la palette fonction : traitement du signal>>opérations sur les signaux>>corrélation croisée). Il est égal à la distance entre l’origine et l’abscisse du pic maximum de ta corrélation. Connaissant aussi la fréquence (identique) de tes signaux tu remontes aisément à la phase.
Bonne journée
Flo
Open Diagram First -
Gedruckte Formulare in Formscentral auswerten.
Hallo,
wir haben das Problem das einige Leute kein E-Mail Adresse haben und unsere Formulare per Post zurück schicken.
Wie können wir diese Formulare mit Formscentral einlesen und auswerten?
MfG
Attila FunkeGAr nicht. Von Hand eingeben.
Mylenium -
Wert aus Formularfeld auswerten und Wert übergeben
Hallo zusammen und schön Euch gefunden zu haben,
Folgende Problemstellung habe ich vor der Nase und bin absoluter Neuling in JavaScript ...
Ich habe ein PDF-Formular mit LiveCycle CS4 gestaltet. Nun möchte ich den Wert aus dem Formularfeld "Kostenstelle" auswerten und einen bedingten Inhalt in das Feld "Abteilung" als Vorschlag automatisch
eintragen lassen.
Beispiel:
Jemand trägt 044 bei "Kostenstelle" ein und es soll im Feld "Abteilung" Hauswirtschaft erscheinen.
Wie sieht der Quellcode aus und wo wird die Vergleichstabelle dann abgelegt? Im Quellcode?
Ich danke für Eure Unterstützung. Natürlich bin ich mit Links zu Lösungsbeschreibungen zufrieden oder Literaturhinweisen.
LG ThórralfHallo,
das Problem kannst Du mit ein wenig Javascript lösen.
Im change:Event des Feldes "Kostenstelle" einfach folgendes Skript einfügen:
var input = xfa.event.newText;
if (input === "044") {
Abteilung.rawValue = "Hauswirtschaft";
} else if (input === "123") {
Abteilung.rawValue = "Geschäftführung";
} else if (input === "000") {
Abteilung.rawValue = "Personalleitung";
} else {
Abteilung.rawValue = "";
Das Skript prüft direkt bei der Eingabe den gesamten Feldwert.
Ist dieser dann z.B. "044", wird das Feld "Abteilung" sofort mit dem Wert "Hauswirtschaft befüllt, bei "123" mit "Geschäftsführung", bei "000" mit "Personalleitung" und bei allen anderen Eingaben mit "" (Nichts). -
Setting sample rate for sinus analog output
Hello,
I've been trying to do something very simple : using an analog output of the card PCI 6221 to produce a sinus curve of frequency 50 Hz. For this I used a Vi to create a sinus curve and the different DAQmx VIs. But I have difficulties understanding the principle of virtual channel and I think I'm doing a mistake setting the sample rate and samples number : one time for the sinus vi, second time for "DAQmx - Timing". Should I use the same values for both of these VIs ?
On my oscilloscope, with frequency=50Hz and sample rate=1kHz, I get a null signal. Then depending on both values, I get differently rated signals. For example with f=1Hz and sr=10kHz, a sinus of frequency 0,7 Hz.
Solved!
Go to Solution.
Attachments:
Sinus analog output.vi 32 KBYes, thanks for your advice. I used the structure given in the example and now it's working fine. I'm still not sure what I did wrong though.
I would have a second question now (should I create a new topic?):
I put a continuous sine wave on the analog output. As soon as this is running, (or maybe after a short delay) I want to measure a limited amount of samples on my analog input. How can I be sure, it's not going to start measuring before the output is properly set ?
I don't think a trigger would solve the problem since I'm going to vary the output Amplitude. -
Hello!
What is the best way to define quality of sinus signal?
Regards!I'm not completely sure what you are trying to find. Two common measures of signal "quality" are signal-to-noise ratio (SNR) and total harmonic distortion (THD).
Tony
NI - Measurement Studio -
Ich möchte in einer LabWindowsCVI-Anwendung Bilder einer GigE-Kamera mit IMAQdx grabben und mit dem NI Vision Devolpment Modul auswerten und als Videostream mit 30 fps in einem AVI-File speichern. Mit "imaqCreateAVI" und "imaqWriteAVIFrame" kriege ich das avi-File zwar geschrieben, erzeuge aber wahlweise sehr große Datenmengen oder zu gering aufgelöste Videos mit den zur Verfügung stehenden Kompressionsfiltern Ein H.264 Video Encoder ist im aktuellen Vision Development Module wohl nicht enthalten, oder? Kann ich den auf anderem Wege bekommen oder kommt der demnächst im VDM2013?
Thank's, GuentherMueller, I think ist is a good idea to carry on in English. Hopefully I'm not the only CVI user who wants to create AVI-Files to archive the images from a IMAQdx driven camera. Perhaps and I can get some advice from others already concerned with my question. I also used "imaqGetFilterNames()" to get the list of available compression filters on my PC. In fact I've got two different development machines, and I put a screenshot of the one with the newest VisionDevelopmentModul Version 2012SP1, a windows7prof64Bit system, as an attachment to this reply to show the installed NI software components and the compression filters found on it by my CVI-Program. When I start my program on an older XP-System still used to compile older CVI2010SP1 applications, I get some different compression filters displayed, how and when they were installed on my PC... I don't know. Which compression filters are really delivered with Vision Development Module 2012 SP1? How can I install and use different ones like xvid or x264?
Thanks for your help!
Attachments:
NIcomponentsAndCodecsOnWin7prof64Bit(NewstVersions).jpg 163 KB -
Daten aus TestStand mit DIAdem auswerten!
Hallo zusammen,
Ausgangslage:
Daten werden mit TestStand in eine Datenbank abgelegt.(Beispiel)
Ich soll eine Histogramm-Klassierung und eine Trenddarstellung mit wählbaren Losgrössen in Diadem 10 darstellen.
Frage: Wie bekomme ich alle Messwerte eines Messschritts in ein Kanal?
(Gibt es vieleicht im TestStand bessere Lösung um die Daten besser zu erfassen !?)
Und wie kann ich für die Berechnung eines Mittelwertes für Trenddarstellung eine Losgrösse definieren?
Freundliche Grüsse
David
Attachments:
Beispiel1.zip 22 KBHallo!
Für die zusammeführung alle Messdaten in einem Kanal, können Sie einen kleinen Script schreiben.
Hier einen kleinen Script, die Ihren Datenbank scannt und 3 Kanälen erzeugt für "Measurement 0", "Measurement 1" und "Measurement 2":
Option Explicit
dim i, index
dim kanal_laenge
kanal_laenge = CMax("UUT_Result") - CMin("UUT_Result") 'Berechnet die Anzahl von Messschrittes
call ChnAlloc("Measurement 0", kanal_laenge, 1, DataTypeFloat64, "Numeric") 'Erzeugt die 3 Messkanälen
call ChnAlloc("Measurement 1", kanal_laenge, 1, DataTypeFloat64, "Numeric")
call ChnAlloc("Measurement 2", kanal_laenge, 1, DataTypeFloat64, "Numeric")
i = 1
index = 6
Do While index < ChnLength("UUT_Result") 'Scannt die Datenbank für die Werten
ChD(i, "Measurement 0") = ChD(index, "NUMERIC_VALUE") 'von Measurement 0, 1, und 2
ChD(i, "Measurement 1") = ChD(index+1, "NUMERIC_VALUE")
ChD(i, "Measurement 2") = ChD(index+2, "NUMERIC_VALUE")
i = i+1
index = (i-1)*22+6
Loop
Sie können dann beim Statistik (in Diadem Analysis) die Historigramm-Funktion verwenden, um Ihren Berechnungen zu machen.
Sonst können Sie im Script die Funktion "ChnHistogram" verwenden und die Berechnung direkt im Script durchführen lassen.
Mit freundlichen Grüssen
Ken Tobler
Maybe you are looking for
-
hi, I could not log on my Windows 8.1 because it was telling me the password is not correct while the passwoord was correct. so I serached IN Google and found how to work some security files like Ultiman en CMD to clear the password and log again. bu
-
I am so frustrated that I am almost guaranteed to switch service as soon as I get back to the states. I corresponded with Verizon 2 weeks before I left on the trip and they told me everything would work fine and told me the rates I would pay to have
-
I'm trying to run some games with wine, but everyone shows the same problem when I try to run it in fullscreen. For instance if I run Starcraft or Fallout 2, terminal says: fixme:advapi:SetSecurityInfo stub fixme:win:EnumDisplayDevicesW ((null),0,0x3
-
TS3682 Iphone 4 won't turn on?
My iphone 4 ran out of charge last night, i put it on charge and this morning when i took it off charge it was hot but not charged i have tried charging on my dock usb and different wall chargers nothing works! i have tried to hard reset and that wil
-
TIP 01: Default User Tablespace in 10g by Joel Pèrez
Hi OTN Readers! Everyday I get connection on Internet and one of the first issues that I do is to open the OTN main page to look for any new article or any new news about the Oracle Technology. After I open the main page of OTN Forums and I check wha