easy-forum

Deutsch - Software => Kommunikation => Programmierung mit EASY_COM.dll => Thema gestartet von: andreas_k am August 16, 2014, 18:06:57 Nachmittag

Titel: Read from easy problem c#
Beitrag von: andreas_k am August 16, 2014, 18:06:57 Nachmittag
Hi.
Welcome everyone.
Hardware:
Easy 512-DC-RC
temp sensor is connected to I7 (thru 0-10V converter),
I1 On - starts program

I try to write small program in c# (EASY_COM.dll v 2.50 with easyComApi_MC.cs) - temperature control panel.
Basic works (I can read clock, input, output  states from device), but how to read analog values?
I mean I2 value from analog comparator ("A01") - it is even possible?

Regards
Andrzej
Titel: Re:Read from easy problem c#
Beitrag von: andreas_k am August 21, 2014, 11:57:46 Vormittag
No one knows how to do it?
Titel: Re:Read from easy problem c#
Beitrag von: andreas_k am August 21, 2014, 21:06:30 Nachmittag
Ok, so diferent way:
What's MD ?
Zitat
10 1 to 20 double word marker, MDx MDx…MDx+n 4…80 Byte

With that I can read and set analog value comparator (A01 on first line)? If yes, how?
Titel: Re:Read from easy problem c#
Beitrag von: Peter_Pig am August 25, 2014, 13:44:20 Nachmittag
Hi Andrew,

as far as I know, you can't access the values of anything else than the stuff you have mentioned (clock, markers, etc. ...) using the DLL.

In your case you must link the output of  A01 to an MD and let your program read the value out from there.

Make sure to chose an MD that is not being used by other parts of your program:

For example, if you are using M1 somewhere else, MD1 should not be used, because M1 is the first bit of MD1.

There is a table with the memory layout somwhere in the documentation. Hard to find thou...

Good luck!

Regards,

Peter
Titel: Re:Read from easy problem c#
Beitrag von: andreas_k am August 28, 2014, 20:47:41 Nachmittag
Thanks.
I expected that answer, so I almost finish "own*" library to read and write all needed data (even hysteresis of analog comparators  thru Easy OPC server. Works really nice...


* I found on web one example with sources in VB, I cut something, add something different,  for my expectations is enough...