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.
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?
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?
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
remove the [CmpBlkDrvCom] section - this is not needed if you just want to use serial comunication in your iec application..
Could it be a file permission issue? Does the CODESYSControl_User file need sudo rights?
Deleted all settings, made such settings for com port '1', error ERROR_UNKNOWN 5004.
MyComOpen : COM.Open;
aParamsB115200 : ARRAY [1..7] OF COM.PARAMETER :=
(udiParameterId := COM.CAA_Parameter_Constants.udiPort, udiValue := 1),
(udiParameterId := COM.CAA_Parameter_Constants.udiBaudrate, udiValue := 115200),
(udiParameterId := COM.CAA_Parameter_Constants.udiParity, udiValue := COM.PARITY.NONE),
(udiParameterId := COM.CAA_Parameter_Constants.udiStopBits, udiValue := COM.STOPBIT.ONESTOPBIT),
(udiParameterId := COM.CAA_Parameter_Constants.udiTimeout, udiValue := 0),
(udiParameterId := COM.CAA_Parameter_Constants.udiByteSize, udiValue := 8),
(udiParameterId := COM.CAA_Parameter_Constants.udiBinary, udiValue := 1)
;
Last edit: tomas111 2023-04-13
cuteCom sees the device and transmits the data.
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?
please use for Com1:
[SysCom]
Linux.Devicefile.1=/dev/ttyUSB0
It is great! Now everything works! Thank you for your help!