Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

In LabVIEW, how can I address a digital output line in a NI7350 board?

In LabVIEW, how can I address a digital output line in a NI7350 board?
 
Thank you, Ivo
0 Kudos
Message 1 of 6
(4,297 Views)
In the NI-Motion palette go to Analog & Digital IO and select the "Set I/O Port MOMO.flx" vi.
Here is a paragraph from the online help:

The Set I/O Port MOMO VI sets the logical state of bits in the general-purpose I/O port selected.

Using the Must On/Must Off protocol allows you to set or reset individual bits without affecting other output bits in the port. This gives you tri-state control over each bit: on, off or unchanged. A True in a bit location of the Must On bitmap turns the bit on, while a True in the corresponding location of the Must Off bitmap turns the bit off. A False in either bitmap has no effect, so leaving both the Must On and Must Off bits at zero is effectively a hold and the state of the bit is unchanged. If you set both the Must On and Must Off bits to True, it is interpreted as a Must On condition and the bit is turned on.


I hope that helps,

Jochen Klier
National Instruments Germany
0 Kudos
Message 2 of 6
(4,289 Views)

I am looking to do the same thing with my 7356 controller.

Looking over the FlexMotion VI's though, it seems that I won't be able to mix lines within a port to have some as input and some as output.

 

For example - what I was hoping to do was use Port 1 Lines 0, 1, 2, 3 for output to a fluid valve for 4-line BCD control and monitor Port 1 Lines 4 and 5 as output from the valve (which would be input to the board).

Am I restricted to using all the lines in a general digital IO port on the motion card in one direction?

Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 3 of 6
(4,153 Views)
You can define the digital line direction bit-wise with flex_set_port_pol() or in LabVIEW with the Set I/O Port Polarity vi. Please refer to the corresponding information in the help file for more information.

Best regards,

Jochen Klier
National Instruments Germany
0 Kudos
Message 4 of 6
(4,134 Views)
I must be totally misunderstanding the use of this VI then, as I do not read the help file to indicate that it controls whether the line direction is input or output - only whether it inverts the signal on the line.
Ryan Vallieu CLA, CLED
Senior Systems Analyst II
NASA Ames Research Center
0 Kudos
Message 5 of 6
(4,131 Views)
Oops, I'm awefully sorry but I have mixed up the function calls. Of course the correct function call is flex_set_port_direction() and the corresponding vi is Set I/O Port Direction.flx.
Sorry again for the mistake.

Jochen

Message Edited by Jochen on 09-11-2006 03:49 PM

0 Kudos
Message 6 of 6
(4,128 Views)