Autor Thema: Read from easy problem c#  (Gelesen 13563 mal)

Offline andreas_k

  • Newbie
  • *
  • Beiträge: 4
Read from easy problem c#
« 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

Offline andreas_k

  • Newbie
  • *
  • Beiträge: 4
Re:Read from easy problem c#
« Antwort #1 am: August 21, 2014, 11:57:46 Vormittag »
No one knows how to do it?

Offline andreas_k

  • Newbie
  • *
  • Beiträge: 4
Re:Read from easy problem c#
« Antwort #2 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?

Offline Peter_Pig

  • Jr. Member
  • **
  • Beiträge: 48
Re:Read from easy problem c#
« Antwort #3 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

Offline andreas_k

  • Newbie
  • *
  • Beiträge: 4
Re:Read from easy problem c#
« Antwort #4 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...