Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect a photomicrosensor in LabView directly?

Hello,

 

I'm currently doing a project portion on detecting a photomicrosensor, EE SX-4070, output in LabView. But I'm not sure about how to go about doing so. As I'm not using any NI DAQ board in acquiring the photomicrosensor output. I'm using a EPOS2 maxon controller 50/5 to acquire the output.

 

Datasheets of photomicrosensor: http://www.omron.com/ecb/products/pdf/en-ee_sx3070_4070.pdf 

 

The datasheets/specifications of the EPOS2 maxon controller 50/5 is attached.

 

But I'm just trying to see if the photomicrosensor output could be seen in LabView.

 

I hope someone could give me some suggestions on this thought of mine, and see if this is plausible.

 

 

 

 

Thank You & Regards,

ParkyPak

0 Kudos
Message 1 of 8
(5,079 Views)

Hi ParkyPak,

 

here are some questions for you:

  1. How do you connect the EPOS drive to your PC? Are you using a CAN interface (which vendor)?
  2. What's the purpose of the sensor in your application?
  3. Are you aware of the instrument driver for EPOS drives for LabVIEW? This driver is provided by Maxon, so please check with the documentation of the driver or with Maxon, if it provides the functionality you are looking for.

Kind regards,

Jochen Klier

National Instruments

0 Kudos
Message 2 of 8
(5,074 Views)

Hello Jochen,

 

1. The EPOS2 is connected via USB cable to my computer and I'm not using CAN interface for my project.

 

2. The sensor in my project acts as a "limit"/stop point, as my motor controls a metal frame structure which is able to move 120 degrees left and 120 degrees right. Thus, to prevent damaging the main frame structure, the sensor is being included. When the sensor is blocked, there's a 5 volts jump from its ground state (unblocked).

 

3. Yes, I'm aware of the EPOS LabView zip provided by maxon, and I'm using that currently. My group had also modified some of the things inside the VI for the sensor. But we still can't get the idea of where can we read the output of the sensor in LabView through maxon EPOS2 controller 50/5.

 

Pardon me as I've just started using LabView this past 2 months, I've also looked up in the books in my school library on LabView, but all I've encountered was that I need a NI DAQ board to read digital/analog inputs into LabView.

I've attached a copy of the VI that my group had modified. Hope you can give a look at it and give me some suggestions on it, as to see if I'm doing it correctly.

 

 

 

 

Thank You & Regards,

ParkyPak

0 Kudos
Message 3 of 8
(5,053 Views)

 

 

I am everything but a software guy but I think you will find the solution on p.26 of the controller manual. Concerning the photosensor, this one has an open-collector output so you will not see any output signal (or voltage) when you connect the output directly to one of the inputs of your controller. Check the specifications of the digital inputs of your controller. If the inputs are TTL compatible you will need an extra pull-up resistor connected to a 5VDC source which has common ground with the input circuitry of the controller (some controller offer a 5VDC output). The value of the pull-up resistor is not very important, everything around 4.7kOhms will work. 

0 Kudos
Message 4 of 8
(5,042 Views)
Oops, reading the digital inputs is described on p.28. 
0 Kudos
Message 5 of 8
(5,041 Views)

Hello Buechsenschuetz,

 

Thanks for your help, maybe the problem lies with not adding a extra pull-up resistor which leads to the maxon controller not able to read the sensor output.

 

But I still hope someone could take a look at my groups modified VI and give me some suggestions if it's able to work.

 

 

 

Thank You & Regards,

ParkyPak

0 Kudos
Message 6 of 8
(5,035 Views)

ParkyPak,

 

I had a look at the code and there is some room for improvements. Here are some suggestions:

 

  1. The overall structure of the code is not clear. A sequence with three event structures is not a recommended design pattern. Your application is not very complex and it shouldn't be a problem to put your code into a single state machine. Maybe for your application a normal case structure would be a better choice.
  2. Don't break the data flow. VCS Get All Digital Inputs.vi is called in parallel to the data flow, so you never can tell, if the configuration (VCS Digital Input Configuration.vi) is called before or after this function. The VCS Get All Digital Inputs.vi lacks also input parameters for axis and error (I don't know if this is a problem). You also could put the configuration vi into it's own case of the state machine.
  3. Don't use local variables if not absolutely necessary. In your architecture you had to use local variables for axis and error, because you have added the sequence structure. As already said, there shouldn't be a reason to use a sequence structure at all.

I hope this helps,

Jochen

Message 7 of 8
(5,030 Views)

Hello Jochen,

 

Thanks for your suggestion, I've also asked my friend who had been using LabView longer than me, and agreed with your saying that there's no need for 3 event in 1 sequence.

As for the rest of the problem, I think that would be the maxon controller problem, as there's still the problem in configuring the digital input into it.

 

 

 

Thank You & Regards,

ParkyPak

0 Kudos
Message 8 of 8
(5,012 Views)