02-26-2019 05:48 AM
Hi,
I'm trying to use the I/O-module PXI-6521 (I know, it´s a bit older) as a 24 Volt output, to switch on a relay that I have connected to pins 1 and 2. Unfortunately I can´t figure out how to program this in LabVIEW. The only example I found, that seems to be compatible with the module, is "Digital Output - Continous Output" but I get an error there from the trigger-setup-block (with different values for sample rate etc.) so I can´t get it to work.
Is there a simple way to program a switch in LabView, so that the NO-contact on pins 1 and 2 of the PXI-6521 switches accordingly to the LabVIEW switch state?
Thanks in advance
Patrick
02-26-2019 07:00 AM
Okay, it´s working with the testpanel in NI MAX. There I can toggle the 8 outputs as i wish. But what kind of blocks do I need in LabVIEW, can anyone help?
02-26-2019 07:27 AM
You failed to tell us which version of LabVIEW you are using, and failed to attach any VI so we could "see for oursevles" and help you with any mis-understandings you might have. Go find the excellent NI White Paper, "Learn 10 Functions in NI-DAQmx and Solve 80 Percent of your Data Acquisition Applications (hint -- Google). It will tell you about using MAX to create a Task, and using the Task to wire up 3-5 DAQmx functions that will "do what you want".
Bob Schor
02-27-2019 02:10 AM
Hi Bob,
thank you for your help, I found the mentioned NI documentation was very helpful and I could solve the problem. I will attach a screenshot of the working VI in case anyone will stumble over the same problem. The "data" pushbutton can be used to control the relay in the PXI-6521, being refreshed every 1000 (="Loop Time") Milliseconds.
Kind regards.
02-27-2019 07:11 AM
You should mark your answer as the solution. This way everyone knows the issues has been resolved.
02-27-2019 08:23 AM - edited 02-27-2019 08:26 AM
It looks like your "Solution" came from one of the Examples that ships with LabVIEW. We frequently suggest that Forum readers check out the LabVIEW Examples -- could you post which Example (and from which Version of LabVIEW you pulled it) you used in your post? This will certainly help others with similar problems (and I'd mark the Post that says "My solution is taken from the LabVIEW Example <Title> that ships with LabVIEW <Version>".
Bob Schor
Oops -- didn't notice that your PNG says, right on the top, that the example is "Digital - SW-Timed Output". Maybe this Post should be marked as the "solution" ...