LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI PCI-7350 Using Sensor Data to Control Outputs

Hello All,

 

I've been using a NI PCI-7350 motion control card and trying to create an interface in Labview now. 

I have some proximity sensors attached that are working as switches, on/off.

I am able to read the data with Read Digital I/O Block from NI 73xx Category, however I couldn't manage to use this data to start/stop the motor.

How can I use the data of the sensor to control the motor? 

I have attached my current connection, how I read the data from desired ports and bits.

 

Thanks in advance.

 

 

Download All
0 Kudos
Message 1 of 5
(2,612 Views)

your two screenshots are quite undescriptive of the problem.

so far i only see you read a value and display it in a indicator.

with that you won't be able to control a motor, because nothing goes into a "control" of your motor.

 

 


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 2 of 5
(2,604 Views)

Have you already managed to test the motor's setup using, for example, MAX?

 

If so, it might be best to start by creating a separate VI that controls the motor and testing that you can get it set up in LabVIEW using the Motion VIs (ignoring the sensors).

 

Once you have that all working (maybe you already reached this point) you can start working on determining logic for the sensors. Do you want a fixed speed JOG when the sensor is inactive, or similar? If so, probably a while loop containing a case structure checking the output of the sensor is sufficient.


GCentral
0 Kudos
Message 3 of 5
(2,600 Views)

I can already run my motors to the given position via Labview using the attached diagram.

And also I can read sensor data as I attached my first message.

 

What I want to do is to combine these 2 and to stop my motor when the sensor is ON.

 

I know so far I only have an indicator showing the state of the sensor but here is where I'm stuck, I couldn't create a "control" from Read Digital I/O Data block. 

0 Kudos
Message 4 of 5
(2,589 Views)

Ok - so assuming that a) your motor is happily in motion, and b) you have some function available to stop the motion if the sensor is triggered, it seems like all you need to know is that you can use the function "Unbundle by Name" on your cluster output in the images from your first post to get the boolean value.

 

My guess is this boolean is a sensor on/off indicator?

 

If so, read that boolean in a loop using code from picture 1 and if true, stop motion.


GCentral
0 Kudos
Message 5 of 5
(2,581 Views)