INFO: Dieses Forum nutzt Cookies...
Cookies sind für den Betrieb des Forums unverzichtbar. Mit der Nutzung des Forums erklärst Du dich damit einverstanden, dass wir Cookies verwenden.

Es wird in jedem Fall ein Cookie gesetzt um diesen Hinweis nicht mehr zu erhalten. Desweiteren setzen wir Google Adsense und Google Analytics ein.


Antwort schreiben 

generqte a PWM signal with LabVIEW using digitals outputs



Wenn dein Problem oder deine Frage geklärt worden ist, markiere den Beitrag als "Lösung",
indem du auf den "Lösung" Button rechts unter dem entsprechenden Beitrag klickst. Vielen Dank!

08.03.2006, 18:01
Beitrag #1

foxone Offline
LVF-Grünschnabel
*


Beiträge: 11
Registriert seit: Mar 2006



kA



generqte a PWM signal with LabVIEW using digitals outputs
I would like to generate a PWM signal (freq 50 hz Duty Cycle 10%) thanks to LabVIEW and NI-DAQ, on 5 digitals outputs in order to control 5 servomotors. Is it possible with LabVIEW, and how?
Thanks
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
Anzeige
08.03.2006, 18:38
Beitrag #2

cb Offline
LVF-SeniorMod


Beiträge: 1.731
Registriert seit: Feb 2006

2018SP1
2001
EN

40xxx
Deutschland
generqte a PWM signal with LabVIEW using digitals outputs
please take yoursef the time and take a look at the examples, which are shipped with LabVIEW:

help --> find examples --> the example finder opens

click on "index" in the left tab,

type "PWM" and
open The example
"PWM-Counter Output.vi"

http://www.rotabench.com - rotierende Prüfstände nach dem Baukasten-Prinzip
Webseite des Benutzers besuchen Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
09.03.2006, 11:20
Beitrag #3

foxone Offline
LVF-Grünschnabel
*


Beiträge: 11
Registriert seit: Mar 2006



kA



generqte a PWM signal with LabVIEW using digitals outputs
Thanks i2dx, but I have ever seen the examples, and they use Analog or Counter output. I have to use Digital Output, because I need to control 6 servomotors, and there are 8 Digital output, therefore it matchs. But, there is only 2 Counter et 2 Analog output, so I con't use them, unless you could give me a solution. That's the reason why, I really want to knom if it's possible to create PWM with Digital output.
thanks
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
09.03.2006, 13:26
Beitrag #4

cb Offline
LVF-SeniorMod


Beiträge: 1.731
Registriert seit: Feb 2006

2018SP1
2001
EN

40xxx
Deutschland
generqte a PWM signal with LabVIEW using digitals outputs
yes, it is possible with digital output, too, but you have to do a lot of work "by hand" ...

take a look at my example. i hope, this will help you. be aware that the "calculate dutycycle algorithm" is a QUICK and DIRTY DRAFT. You will have to improve it, but i hope it gives you a hint, how it can work.

in my draft there are only 10 steps 0%, 10% .... 90%, 100%
you have to increase the number of steps, and the sample rate, etc ...


Angehängte Datei(en)
Sonstige .vi  DIO_PWM_draft.vi (Größe: 127,17 KB / Downloads: 2469)

http://www.rotabench.com - rotierende Prüfstände nach dem Baukasten-Prinzip
Webseite des Benutzers besuchen Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
09.03.2006, 14:46
Beitrag #5

foxone Offline
LVF-Grünschnabel
*


Beiträge: 11
Registriert seit: Mar 2006



kA



generqte a PWM signal with LabVIEW using digitals outputs
Thanks a lot, i2dx.
I'll try with your example, your are helpfull.
I just wonder how to change the frequence ?
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
09.03.2006, 15:24
Beitrag #6

cb Offline
LVF-SeniorMod


Beiträge: 1.731
Registriert seit: Feb 2006

2018SP1
2001
EN

40xxx
Deutschland
generqte a PWM signal with LabVIEW using digitals outputs
frequency depends on the sample rate.

the basic calculation in my example is:

i put 100 samples in the output buffer on each loop iteration. the output sample rate is 1000 Hz. i divide the 100 samples into 10 blocks of 10 samples ==> the frequency of one block is 100 Hz or one block lasts 10ms. and the output of one loop iteration are 10 pwm-signals ...

helpfull?

http://www.rotabench.com - rotierende Prüfstände nach dem Baukasten-Prinzip
Webseite des Benutzers besuchen Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
Anzeige
09.03.2006, 17:31
Beitrag #7

foxone Offline
LVF-Grünschnabel
*


Beiträge: 11
Registriert seit: Mar 2006



kA



generqte a PWM signal with LabVIEW using digitals outputs
yes, it is really helpful for me, but I have still some troubles, because I confess, I am not very confident with LabVIEW, and I think I am bad too.
So, I need a frequence of 50 Hz, I have changed values and it work, but I need a much better accuracy concerning the duty cycle, it means, a step of 0.1%, but I can't chose the correct values :evil: Could you help me again, pls ?
For the moment, nothing works because "Device identifier is invalid" as it's written. But my device is number 1 too. I don't know why it doesn't work but I'll continu to look for solutions.
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
09.03.2006, 19:01
Beitrag #8

cb Offline
LVF-SeniorMod


Beiträge: 1.731
Registriert seit: Feb 2006

2018SP1
2001
EN

40xxx
Deutschland
generqte a PWM signal with LabVIEW using digitals outputs
ok, here it is.

it's up to you to understand, what's happening in there, maybe someone other will help (sorry, but i still have work to do ...)


Angehängte Datei(en)
Sonstige .vi  DIO_PWM_50Hz.vi (Größe: 96,5 KB / Downloads: 1362)

http://www.rotabench.com - rotierende Prüfstände nach dem Baukasten-Prinzip
Webseite des Benutzers besuchen Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
10.03.2006, 17:51
Beitrag #9

foxone Offline
LVF-Grünschnabel
*


Beiträge: 11
Registriert seit: Mar 2006



kA



generqte a PWM signal with LabVIEW using digitals outputs
hi i2dx, sorry to disturb you again.
Thank you again for your 50 Hz program, it's precisely what I need. But unfortunatly, it doesn't work yet. The problem comes from the link between NI-DAQmx and the PXI 6070E device. In fact, it works with the test panel, but I can't configure the VI "DAQ configuration" with LabVIEW, and when I lunch your program (or any other programs containing DAQmx VIs), the error 200220 occures. Have you ever had this kind of problem ? Isn't that a problem with software's versions ? (NI-DAQmx 3.1)
Otherwise, is it possible to create the same progam you have ever done (50Hz) but without using DAQmx VIs, just tradionnal DAQ VIs ? (I don't want you to create it, I just want to know if it's feasible in theory).
Thanks
Have a nice weekend end.
Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
11.03.2006, 09:05
Beitrag #10

cb Offline
LVF-SeniorMod


Beiträge: 1.731
Registriert seit: Feb 2006

2018SP1
2001
EN

40xxx
Deutschland
generqte a PWM signal with LabVIEW using digitals outputs
please take a look at this:

Common NI-DAQmx Error Codes and Solutions: Codes -200000 to -200299 and -50103

DAQmx 3.1 sound very old. Can you upgrade to the current version?

Download NI-DAQmx 8.0.1

please look in the Measurement and Automation Exploer, which Device# your 6070E has, i guess you have to change the device#s here:


Angehängte Datei(en) Thumbnail(s)
   

http://www.rotabench.com - rotierende Prüfstände nach dem Baukasten-Prinzip
Webseite des Benutzers besuchen Alle Beiträge dieses Benutzers finden
Diese Nachricht in einer Antwort zitieren to top
Antwort schreiben 


Möglicherweise verwandte Themen...
Themen Verfasser Antworten Views Letzter Beitrag
  Wie lese ich ein TTL-Signal richtig in LabView ein? aet 3 6.623 25.09.2012 15:39
Letzter Beitrag: aet
  mehrere Inputs und Outputs USB-6221 kob 1 3.927 18.07.2012 19:28
Letzter Beitrag: GerdW
  Digitale Outputs des USB DAQ 6212 zudy 9 6.983 28.07.2011 15:54
Letzter Beitrag: zudy
  SPI Signal mittels LabVIEW Sandisk 20 17.272 18.01.2011 12:43
Letzter Beitrag: Sandisk
  Zwei DAQmx Channels zur Erzeugung zweier Analog Outputs zur Steuerung eines galvano XY-Scanners RiSo1985 18 15.148 22.01.2010 11:02
Letzter Beitrag: Lucki
  Analog Signal und Counter Signal erfassen fiedl04 0 5.901 29.10.2009 11:58
Letzter Beitrag: fiedl04

Gehe zu: