Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

IR led signal distance,Omron PLC reset

  1. Nov 13, 2009 #1

    I have 2 questions here and hope some experts can answer them.

    Question 1:

    How to improve the signal distance of the IR led?What parameters in the datasheet that we should look into?

    I have purchased few IR leds but all of them cant shoot more than 3 metres. I noticed increasing the current to the leds does increase the distance but not by much.The absolute max rating for IF is 100mA and I even pushed the current to this limit but didnt see any significant improvement.

    Could it be because of the 950 nm wavelength of the led which limits the distance?

    My project does not need signal to go above 1 metre but it would be better if I can get to know on the signal distance a little bit more.


    Question 2:

    I am using Omron PLC CPM-2 version to control my project.Although I have successfully produce a working program for the project,there are certain sequences of inputs which can crash the program.Of course I tried my best to physically avoid having multiple inputs all at once but sometimes the IR signal accidentally hit few receivers and crash the programs.

    Once the program crash,there is no way to have it work normally and it usually stuck at certain output.

    Methods which I tried to reset the PLC but to no avail;

    1)Clearing all memory which usually ended with PLC error.
    2)Transfer the program to PLC again.
    3)Switch to program mode,monitor mode and run mode.
    4)Switch off and on the PLC.

    Sometimes,the PLC get back to running after I click here and there but I am not sure the way to reset the PLC.Today,after numerous unsuccessful reset,I had to change to another PLC.

    Although I managed to produce the program which work in the sequence I want,I find it rather hard to fix the crash.

    For example,Input 1 produces the output sequence 1.Next input 2 produces the output sequence 2 and so on.If I play with the inputs such as on and off input 1,2,3,4,5 randomly,the program could crash.

    So the best way I can do now is to reset the PLC everytime it crashes and try to avoid having random inputs all at once.

    Thank you.

    P/S:Sorry for the lengthy questions :redface:
  2. jcsd
  3. Nov 13, 2009 #2


    User Avatar

    Staff: Mentor

    On the IR LED distance question,

    1) Use reflective optics to concentrate more of the IR energy at the receive diode. Use a parabolic reflector at the TX IR LED, and a similar reflector at the RX diode.

    2) Are you modulating the drive current to the TX LED? You should be doing that, so that you can bandpass the RX energy, to help reject stray IR and optical noise. The better your SNR, the more gain you can use at the RX circuit, and hence the farther your effective range.

    On your second question, it seems like the main problem is the crashes, not the difficulty recovering from them. You need to look more into your design, to understand what is causing the crashes.

    I'm not all that familiar with programming PLCs, but you need to be sure that you have no illegal states that your state machine can get to (like from some particular series of events happening), and no unused states that have no return back to the reset state.
  4. Nov 13, 2009 #3

    So,my only option is to use reflective optics?But what about getting better and stronger IR led?What parameter that I should be looking for at the datasheet that say this LED can shoot,say above 10 metre.

    Regarding the PLC program,I dont think I have the time to fix it. The problem lies with the a timer in the program which stalled under certain sequence of inputs.When it crashes,the PLC wont respond to new inputs.

    So the best way I need to do now is to reset the PLC quickly if the program crashes.But I dont know how to reset it.Usually I reset the PLC by luck after playing around on the software.
  5. Nov 13, 2009 #4


    User Avatar

    Staff: Mentor

    I sure hope this is for a school project, and not a real-world project. This is not how you need to approach real-world work and projects.
  6. Nov 13, 2009 #5
    This is a school project.
    Of course,I would like to get everything nice and tidy.However,I need to put off some of the work due to time and cost contraints.I still have 2 other very tough subjects - Electrical power and electronic system design to focus on.
  7. Nov 13, 2009 #6


    User Avatar

    Staff: Mentor

    Could you maybe post the state machine design here for us to look at? Maybe we can help you debug your PLC state machine program.
  8. Nov 13, 2009 #7
    I did not apply the state to state analysis.I only have the .cxp and .opt file right now.I will need to request to have the PLC ladder diagram to be printed out since I dont have the software installed at home.

    I have done state diagram in my electronic system design but I am not sure how this can be applied to the PLC since we are not designing the flip-flop circuit.

    My only concern right now is to learn how to reset the PLC when it crashes.The rest can be tackled on when time permits.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook