Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

PWM on digital output DAQ 6528

Solved!
Go to solution

Hi,

currently I am trying to control an electric motor through it's controller. This ontroller needs PWM signal 24V max as a speed control. Unfortunatelly I have the PXI with the NI card 6528 which doesn't have counter outputs. I need there 100Hz. Is ist possible to use this card to control this motor? If it is possible, how should I programm it? I have also a NI card 6230, which has counter outputs, thus there are only 5V on counter output, I prefere using 6528 card instead of going into electronic to build an circuit for 6230.

 

Thank you in advance for your help!

Martin 

0 Kudos
Message 1 of 7
(6,604 Views)

Hi

 

If you insist on working with 6528, then you need to work with digital outputs, which are only software timed. In other works you would need to write a program, which would be changing the value on digital output every time that you need it. Here are benchmarks of what's realistic: http://digital.ni.com/public.nsf/websearch/624CD9E32E2C4076862570C10000B9DE?OpenDocument

 

You might also want to consider running Real Time operating system, which offers deterministic operation

Best regards,
Maciej Antonik
National Instruments Poland
0 Kudos
Message 2 of 7
(6,569 Views)

Hi,

i've tried PWM form this example http://digital.ni.com/public.nsf/allkb/1561D31534F07D608625727900391114 . I have placed this vi in a sequence structure. The result is, that it blocks the code in the previous frame of the sequence structure. In the first frame there are only 2 booleans that are written to the 2 digital outputs. When I change the state of these booleans, its results are written to the outputs only when I set the switch in the PWM vi. to stop.What can be the reason and how can I solve the problem to be able reliably set outputs?

 

Regards,

Martin 

0 Kudos
Message 3 of 7
(6,465 Views)

Hi Martin

 

It is very difficult to guess what could be the problem without seeing your code. Do you think you could post here the VI which you have created?

Best regards,
Maciej Antonik
National Instruments Poland
0 Kudos
Message 4 of 7
(6,463 Views)

Hi,

I've attachen my vi. Maybe it's the probem of the loop outside sequence structure?

 

Regards,

Martin

0 Kudos
Message 5 of 7
(6,455 Views)
Solution
Accepted by topic author martin3885

Hi

 

The example you are using has a while loop inside of it. So the VI you made will stay in the first loop (second page of Sequence Structure) as long as the subVI is running (=until you stop it or there is an error). I would propose to spend some time on learning basics of LabVIEW structures to understand it better. Here is one sample tutorial, which might help you understand, how loops are working: http://zone.ni.com/devzone/cda/tut/p/id/7588. This tutorial might also be helpful: http://decibel.ni.com/content/docs/DOC-1694. There are also other tutorials - just search on ni.com. 

  

 

 

Best regards,
Maciej Antonik
National Instruments Poland
0 Kudos
Message 6 of 7
(6,451 Views)

Hi Maciej,

many thanks for your post! Now it seems obvious for me:)

 

Regards,

Martin 

0 Kudos
Message 7 of 7
(6,447 Views)