CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Sun Apr 23, 2017 8:39 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 78 posts ]  Go to page Previous 1 2 3 4 5 6
Author Message
PostPosted: Thu Apr 20, 2017 1:08 pm 
Offline

Joined: Thu Apr 13, 2017 8:01 am
Posts: 3
HTejada wrote:
ekmekci wrote:
Dear All,

This topic was so helpfull for me about getting data from usb via codesys.

I used, Edwin's example it works well. I can read data from my usb GPS receiver.

But, i wonder what if i have 2 usb device at the same time.
How we can control both of them at the same time ? It is possible to do it?

For example;
For one usb device we can use
FirstSerialLine(
slMode:= SL_READWRITE,
udiPort:= 1,
udiBaudrate:= 4800,
paParity:= COM.PARITY.NONE,
sbStopBits:= COM.STOPBIT.ONESTOPBIT,
udiByteSize := 8);

what we need to do for 2 usb device at the same time.

Thank you for your help.


if 2 usb are the same manufacture, you can change udiport:=2 for second device. You can create news string i/o for the second device.

Lucky!

BR
Hector.



Thank you for your help. But what if i use 2 usb devices which different manufacture ?
What i need to do.

Also, what is the mean "same manufacture" ? Could you please give example ?


Top
   
PostPosted: Thu Apr 20, 2017 5:57 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 1887
Hi,
set symbolic links in Linux

Example:
/dev/ttyUSB0 -> /dev/USBCDS0
/dev/ttyAMA0 -> /dev/USBCDS1

and then in /etc/CODESYSControl.cfg only this line will be needed:

[SysCom]
Linux.Devicefile=/dev/USBCDS

BR
Edwin


Top
   
PostPosted: Fri Apr 21, 2017 12:28 pm 
Offline

Joined: Thu Apr 13, 2017 8:01 am
Posts: 3
Edwin Schwellinger wrote:
Hi,
set symbolic links in Linux

Example:
/dev/ttyUSB0 -> /dev/USBCDS0
/dev/ttyAMA0 -> /dev/USBCDS1

and then in /etc/CODESYSControl.cfg only this line will be needed:

[SysCom]
Linux.Devicefile=/dev/USBCDS

BR
Edwin



Thank you Edwin,

I will try and i will let you know,


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 78 posts ]  Go to page Previous 1 2 3 4 5 6

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 7 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