Sample program for a beginner

463 views
Skip to first unread message

Amir Sabbagh Pour

unread,
Nov 14, 2013, 1:20:19 PM11/14/13
to beckhof...@googlegroups.com
Hi all,

I'm quite new to ADS. I want to make this library to work in Linux. I  have complied it and I have the commands available.
I'm using Beckhoff CX-5020 running windows xp. I need a sample program that reads a variable "test" from the PLC.
It would be nice if you can add such a sample file as it makes it much easier to start. I'm quite confused with ADS. There are a lot of documentation which makes it confusing for me.
If I want to read data from the PLC form a linux machine do I need to run a server ADS on the linux machine or a client? Does the server already exist on the PLC? How do I configure the PLC to start serving incoming connections on ADS?
Sorry for the stupid questions.


Luis Matos

unread,
Nov 14, 2013, 5:34:06 PM11/14/13
to beckhof...@googlegroups.com
Hello!

You have samples in:
https://github.com/gass/libads/tree/master/examples

Look for the AdsApiClient and then look for the examples in beckhoff
examples. It asks simple data from plc. And you can evolve from there.

There is no need to start an *ads* server in linux. The server examples
are available for those who want to use ads as slave (like a plc).

It will be a server in future versions, but to manage connections. What
you want is a client only.

There are a lot of improvements coming to libads that will allow you to
read a variable.
Also, this email is great, because we also need to create better
examples and simpler documentation.

In the meanwhile, ask you questions.
> --
> You received this message because you are subscribed to the Google
> Groups "Beckhoff Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to beckhoff-linu...@googlegroups.com.
> To post to this group, send email to beckhof...@googlegroups.com.
> Visit this group at http://groups.google.com/group/beckhoff-linux.
> For more options, visit https://groups.google.com/groups/opt_out.

Amir Sabbagh Pour

unread,
Nov 26, 2013, 11:32:36 AM11/26/13
to beckhof...@googlegroups.com
HI Luis,

Thanks for your fast response. I was quite busy for past few days and could not check here.
I will do as you said. I'm going to check the samples. My problem is I'm not familiar with ADS as I don't use windows so there was almost no point for me to read about ADS as I knew there was no official support for Linux, Until now:)
I think I need to know more about ADS. So as someone that already know how to work with ADS maybe the documentation is good enough. I would like to know what kind of information I can fetch from the PLC with the current state of the library? I need a solution to be able to read some variables in the PLC and also if possible some alarm log files. At the moment I'm using a scp client in windows(PLC) to transfer my logs to the linux box which is not a really good solution but it works.
I'm hoping that this ADS can give me more flexibility.
Reply all
Reply to author
Forward
0 new messages