raspberry pi + USB

tomas111
2023-03-31
2023-04-23
  • tomas111 - 2023-03-31

    I have a raspberry pi 4 with a USB cable connected to it (USB to RS232 converter). Can I somehow use it and make data exchange?

     
  • tomas111 - 2023-04-13

    good afternoon, I edited the settings file, but when I open it, an error pops up, maybe I'm not opening the port correctly? Attached are files with settings.

     

    Last edit: tomas111 2023-04-13
  • eschwellinger

    eschwellinger - 2023-04-13

    remove the [CmpBlkDrvCom] section - this is not needed if you just want to use serial comunication in your iec application..

     
    • tomas111 - 2023-04-21

      Could it be a file permission issue? Does the CODESYSControl_User file need sudo rights?

       
  • tomas111 - 2023-04-13

    cuteCom sees the device and transmits the data.

     
  • tomas111 - 2023-04-23

    If I choose:
    (udiParameterId := COM.CAA_Parameter_Constants.udiPort, udiValue := 0),
    I get an error: WRONG_PARAMETER (5005)
    Or
    (udiParameterId := COM.CAA_Parameter_Constants.udiPort, udiValue := 1),
    I get an error: ERROR_UNKNOWN (5004)
    Which port should be opened? I think the problem is in the port number. Right I think?

     
  • eschwellinger

    eschwellinger - 2023-04-23

    please use for Com1:

    [SysCom]
    Linux.Devicefile.1=/dev/ttyUSB0

     
    • tomas111 - 2023-04-23

      It is great! Now everything works! Thank you for your help!

       

Log in to post a comment.