LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Permanently turn a line 'off'

I am using Labview 7.0 in conjunction with a PCI-6220 card.  If I run a VI that says turns 'on' a line, and then close that program, the line remains on, so then I have to run a program that sets the line status to off, which is honestly not that big of a deal.  HOWEVER, I am using a couple pins as linear encoder inputs, so I would like to eliminate the possibility of accidentally running a VI that turns an input pin 'on' while my encoder is hooked up.  So my question is, is there any setting so that I can permanently turn a line off?   Maybe MAX has this option?

Thanks!
0 Kudos
Message 1 of 6
(3,342 Views)
Another option is to turn the state of all lines on the port(s) OFF prior to exiting your vi, if this is feasible for your needs. Typically good advice to do this as part of cleanup operations (close refences, close com ports, turn off digital outputs, set analog outputs to 0V, etc)
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 6
(3,337 Views)
That is what I am currently doing, and it is working fine, however, I would like to eliminate any possiblity of a mistake, and make it so that a program can NEVER turn a selected line on.  That way, I don't open up someone else's VI to find that by hitting 'run', I inadvertently shorted out my $500 encoder.  
0 Kudos
Message 3 of 6
(3,334 Views)
Create a task that will write to the line and keep that task running, a vi that will try to write to that line will return an error.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 6
(3,316 Views)
I don't know if it can be done in MAX, I rarely use it.
Maybe the safest option would be to add a set of connectors between the DAQ card and the encoder so you can unplug it from the DAQ when needed.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 5 of 6
(3,301 Views)
Hello,

There is no option in MAX to turn off a line to prevent applications from access it.  If you have an application that has a task that using the encoder lines, other applications cannot write to those lines while the encoder application is running.

If you are worried about sending signals on digital lines that are attached to your encoder, perhaps some diodes will help.

Regards,

Jesse O.
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D
0 Kudos
Message 6 of 6
(3,269 Views)