Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog Out Debug Question

I am putting together a little chunk of a program that is supposed to output 5V on an AO channel when a certain variable is true, and output 0V when it is false (for a relay).


The portion in question in the Load Locked area (the Gas Locked portion is the same).

When I am configuring this task, I can test it, the test triggers my relays back and forth, so it is not a physical wiring thing.  When I run the program, I can probe the line going into the DAQmx Write block and it reads 5 when it is supposed to, and 0 when it is supposed to.  The bool True constant was added later just to make sure that was not the problem.  What potential issues could I be dealing with here?  I feel like I have removed the possibility of everything but the DAQmx Write block, but it does not have any configurables that I know of.

Daq - PCI 6289
Term Block - TBX 68


Anybody?

Thanks,
~milq
0 Kudos
Message 1 of 13
(4,577 Views)
There is no data flow between (the False constant wired to the LoadLocked and GasLocked) AND (your timed loop). So the loop could execute before you set these values false. Could this be causing your problems?
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 13
(4,562 Views)
The shared variables that trigger the relay portion are controlled by some toggle switches on the hostVI.  The loop acts indefinitely until there is an error or I change the state of the bool "stop" variable.

My issue is that when I run the VI, the relays do not trip.  I have tried with a multimeter, and the applicable ports are not putting out the voltage.  The task works when "tested" (clicking the test button on the edit DAQmx task dialog box.  I can't find what's wrong.

I removed the bool constants in front (originally I only had them there so that everything would start the same way everytime).  Removing them did nothing 😞 

Is there something in the task that I could have configured wrong?


I just don't know why it is not working, I thought it might have been a problem with DAQmx Write block, but perhaps it is here.  I just don't know 😞

If anybody else has some suggestions, by all means, send them this way,
~milq
0 Kudos
Message 3 of 13
(4,556 Views)

Hi Milq,

At first glance, your task configuration seems to be fine. I recommend probing the line that determines if your analog output will be 0V or 5V to make sure that the 5V value is indeed what is supposed to be written.

Regards,
Hal L.

0 Kudos
Message 4 of 13
(4,530 Views)
milq,
 
It may be a hardware problem.  I just looked up the specification for your DAQ card and it looks like the analog output can only supply +/-5mA.  Since relays are inductive loads, they usually require a lot of current.  The relay may be overloading your DAQ card.  Try checking the current required for your relay and see if it matches your DAQ Card.
 
 
Just a thought.
 
Dan
0 Kudos
Message 5 of 13
(4,524 Views)

youngds01:

That's what I thought initally to, esp using an analog port to drive (v.s. digital). But in his original post milq stated he could test and toggle it on and off.

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 6 of 13
(4,519 Views)
I thought the same thing. 

In order to check myself, I did 2 things:

1. I unhooked the relays, and used a DMM (read nothing)
2. I went into "Test" in the "Edit DAQmx Task" and the sine wave that the test function generates triggered the relay just fine.

I am clueless as to why this is not working, it seems to me that it has to be something funky in the task, or something wrong with the DAQmx Write block.  What is wrong, I don't know, but my troubleshooting seems to indicate that.

Thanks for the help though, the more the merrier (until it wants to work),
~milq
0 Kudos
Message 7 of 13
(4,515 Views)
Alright,
 
I am going to throw out a dumb question, and I hope you guys don't mind.  Does the sin wave go positive and negative on "test"?  Is your relay polarity sensitive?  Maybe the wires to the relay are switched?
 
Dan
Message 8 of 13
(4,511 Views)

Dan:

Not dumb, very good question! 5 stars for Uhappy smiley

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 9 of 13
(4,505 Views)
I had not thought of that at all.  I do not know if the relay is polarity sensitive or not.

Unfortunately, the wiring is correct according to the diagram on the front of the relay.  I also set my "test" wave up to go from 0V to 5V from the get-go (so it does not go negative during test).  You got me for a second though (what a tease).  I would also see that with a DMM (which I don't) now that I think about it .

This just puzzles me.  I am not an expert at all (as you can probably see from my posts) but it really seems like something is buggy, or I am using blocks improperly.

No idea,
~milq
0 Kudos
Message 10 of 13
(4,497 Views)