Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

Unable to read ADC values of MCP3008

Anonymous
2017-11-22
2017-11-28
  • Anonymous - 2017-11-22

    Originally created by: 96kdavies

    Hello,

    I have previously read ADC values on Codesys successfully.

    After some playing around to the point of no longer being able to read the values I uninstalled Codesys and re-installed to start from scratch again using the MCP3008 example library.

    I still cannot read the values as it displays 0 constant.

    What is odd, I can read the values in fine through the Adafruit library on Python using Hardware SPI. One thing to note, no changes have been made to my connections.

    Please can someone help.

    Regards

    Kris - P.s I am a beginner to all of this.

     
  • eschwellinger

    eschwellinger - 2017-11-24

    Hi,
    are you using this example application?
    "c:\Users\<yourwindowsusername>\CODESYS Control for Raspberry PI\3.5.11.x\Examples\MCP3008Temperature.project"
    This should work without problems.
    BR
    Edwin</yourwindowsusername>

     
  • Anonymous - 2017-11-27

    Originally created by: 96kdavies

    Hi Edwin,

    Apologies for the delay in getting back to you.

    Yes, I am using the MCP3008 project found in the examples.

    It worked previously until I tried updating to a newer version of Codesys.

    What I have now noticed when I deploy a new runtime I get an error message 'Error output: codesyscontrol.bin: no process found.

    Could this explain what I am experiencing?

    Thanks again,

    Kris

     
  • Ingo

    Ingo - 2017-11-28

    Hello Kris,

    I don't think, that your problem is related to this error message.

    But is it possible, that you used the second SPI port? The default in the project is the first one. You can change this in the configuration settings of the master.

    BR,
    Ingo

    Gesendet von meinem LG-H870 mit Tapatalk

     

Log in to post a comment.