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

Basic Serial communication

esse
2015-11-13
2015-11-17
  • esse - 2015-11-13

    Hello everyone !

    I am a new user in codesys and I want to communicate with a stepper motor i've got via serial port, can everyone guide me? The exact things I want to do is to send some commands for example rotate via my com port...

    THanks in advance

     
  • Anonymous - 2015-11-17

    Originally created by: scott_cunningham

    Look to the SysCom library. You will find functions to set the com settings and open the port.

     
  • eschwellinger

    eschwellinger - 2015-11-17

    Hi,

    yes syscom library in CODESYS and additional search the forum for:
    how to enable the serial port in /etc/CODESYSContol.cfg
    Example:
    (depend on which Interface you want to use you Need to adapt ttyUSB,ttyAMA etc ):
    [SysCom]Linux.Devicefile=/dev/ttyUSBportnum := COM.SysCom.SYS_COMPORT1;

    here is a good example for using Serial com
    l viewtopic.php?f=23&t=6247&p=12387#p12398 l

    BR
    Edwin

     

Log in to post a comment.