CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Mon Dec 17, 2018 10:56 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: RS232 Error 5004
PostPosted: Thu Nov 15, 2018 11:39 am 
Offline

Joined: Fri Oct 26, 2018 8:39 am
Posts: 2
Hello, I'm working on a project where I want to connect to my Raspberry Pi 3 B+ via RS232. I want to use the on board RX/TX pins.

I've made a small program to test it but I keep getting an 5004 Error on my COM.Open function.
I've used some code from a GitHub repo as reference but I'm still getting error's.

I've attached a printscreen of the code running with the 5004 error visible.
I've checked around and tried multiple things I've seen from other posts but nothing worked so far.

I'm using CodeSys V3.5 SP13 Patch 1
CAA SerialCom Library

Thanks in advance.
Jay.


You do not have the required permissions to view the files attached to this post.


Top
   
 Post subject: Re: RS232 Error 5004
PostPosted: Fri Nov 16, 2018 10:35 am 
Offline

Joined: Fri Feb 07, 2014 7:21 am
Posts: 84
Hi,
viewtopic.php?f=23&t=6247&p=22581#p22581
is the tty enabled by
sudo raspi-config

Best Regards
plcmax


Top
   
 Post subject: Re: RS232 Error 5004
PostPosted: Fri Nov 16, 2018 11:40 am 
Offline

Joined: Fri Oct 26, 2018 8:39 am
Posts: 2
Hello,

Yes I've enabled the tty, i've used the raspi-config and I've set in interfacing options serial to disable for login as I've seen on other guides. But the hardware port it self is enabled.

However I'm using ttyAMA0, is this wrong?

Code:
dmesg | grep -i tty
[    0.000000] Kernel command line: 8250.nr_uarts=1 bcm2708_fb.fbwidth=800 bcm2708_fb.fbheight=480 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  dwc_otg.lpm_enable=0 console=tty1 consoleblank=0 root=PARTUUID=cd7583a6-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
[    0.000806] console [tty1] enabled
[    0.873401] 3f201000.serial: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[    0.877887] 3f215040.serial: ttyS0 at MMIO 0x0 (irq = 166, base_baud = 31250000) is a 16550
[   14.824360] Bluetooth: RFCOMM TTY layer initialized


Jay.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 3 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: Andreas Kehrer and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited