LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a control panel for digital output

Hi everyone. I'll start by saying i'm rather new to labview, and i searched the forum properly before posting.

I'm trying to control an AC motor terminal using a cDAQ and the NI 9401 digital I/O card.

I have the logic table for the terminal, but am having a hard time managing to implement it in a convenient way- i'd like there to be 3 buttons, fwd/reverse/stop, and the operation needs to be in real time.

 

The way i tried going about it- number to boolean array, integer to boolean. But i can't find a way to give the buttons themselves numerical value, or connect a few "integer to boolean" outputs to a single "read" function for the cdaq channel, so i can control the operation live.

(example- 3 buttons, valued "1000", "1001", "1011", each time one of them is pressed, the corresponding digital signal is sent via wires 0-3 on the card itself)

Any suggestion or help would be much appreciated.

0 Kudos
Message 1 of 2
(1,866 Views)

Am I understanding correctly? You are trying to control a motor with digital commands using a front panel with buttons corresponding to 3 different digital commands that you want to send? If so, I would use an event structure.

 

Initialize DAQmx before the while loop and then have an event structure with 4 cases [FWD value change; REV value change; STOP value change; CLOSE value change (use a 4th button to end the application)]. Each of the first three events will send a digital command. The last one will just exit the loop. After the event loop, close DAQmx. Research event structures a little bit. They aren't very difficult. There are examples and other information out there. If you have specific questions that you don't have answers to, use this same feed.

0 Kudos
Message 2 of 2
(1,837 Views)