Searching \ for '[PIC]PIC and Wonderware' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'PIC and Wonderware'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]PIC and Wonderware'
2005\12\06@010057 by Stephen D. Barnes

picon face
Just an off the wall idea I had!
Does anyone know if Wonderware's InTouch can be used to interface with a
PIC?

--
Regards,
Stephen D. Barnes

2005\12\06@050623 by Jan-Erik Soderholm

face picon face
Stephen D. Barnes wrote :

> Just an off the wall idea I had!
> Does anyone know if Wonderware's InTouch can be used to
> interface with a PIC?

That's a development environment for Windows platforms, right ?

So the question is rather "can InTouch interface with a COM port ?"

If yes, it shouldn't matter what's on the other end of the line,
should it ?

Or what's your definition of "interface with" ?

Jan-Erik.



2005\12\06@051810 by Stephen D. Barnes

picon face
Jan-Erik Soderholm wrote:

{Quote hidden}

I am interested in using the HMI to graphically show the contents of PIC
registers. In the industrial PLC world, OPC drivers would be used that
communicate with the PLC and retrieve predefined registers (tags). I
guess I should have asked if anyone has done this with a PIC. If so, how
is the software connection with the PIC accomplished assuming the
hardware connection is via serial port to the PIC UART? Would I have to
write a custom driver for the Wonderware, as well as the requisite code
for the PIC that would make register data available to the UART?

--
Regards,
Stephen D. Barnes

2005\12\06@052950 by Jan-Erik Soderholm

face picon face
Stephen D. Barnes wrote :

> I am interested in using the HMI to graphically show the
> contents of PIC registers.

Of course, you can not "see" anything inside of the PIC
using normal interfaces (that is, not using a "programmer"
or "debugger") without the help from some code running
as part of the PIC application.

> Would I have to write a custom driver for the Wonderware,
> as well as the requisite code for the PIC that would make
> register data available to the UART?

You can not "make a register available to the UART".

The code could (on request) take the value from a register
and write it out to the outside using teh UART (to InTouch
or whatever are at the other end of the "line").

I've no idea what has to be done in InTuch...

Jan-Erik.



2005\12\06@092135 by Dennis Crawley

picon face
Stephen D. Barnes <spam_OUTstephendbarnesTakeThisOuTspamcox.net> wrote:
> Just an off the wall idea I had!
> Does anyone know if Wonderware's InTouch can be used to interface
> with a PIC?
> Regards,
> Stephen D. Barnes

Hi,
You have to resolve two major problems:
1.- make a Modbus protocol to fit in a pic code program and ram memory.
2.- decode and encode normal PLC commands.
You can sniff a RS232 PLC connection, working with wonrderware or another
software.

I hope this helps.
Dennis Crawley
Argnetina



2005\12\06@100423 by Mark Scoville

flavicon
face
> From: Stephen D. Barnes
>
> Just an off the wall idea I had!
> Does anyone know if Wonderware's InTouch can be used to interface with a
> PIC?

Hi Stephen,

Not off-the-wall at all! You can almost assuredly interface Wonderware
InTouch to a PIC!

One way is to make your PIC appear as a ModBus slave device on a serial
port. I'm pretty sure InTouch supports ModBus protocol (as do most if not
all other SCADA packages). I'd be surprised if you could find a SCADA
package that doesn't support ModBus.

I have interfaced PICs to GE Cimplicity as well as other SCADAs - no reason
it shouldn't work with InTouch. Once you have the PIC behaving as a ModBus
slave it is quite easy to interface to *ANY* SCADA that supports ModBus.

The ModBus protocol spec is freely available on the web.
http://www.modbus.org/specs.php

Good luck.

-- Mark



2005\12\06@122318 by Stephen D. Barnes

picon face
Mark Scoville wrote:

{Quote hidden}

Thank you for the info! This is the starting point I was looking for.
Any pointers to anything already done? I would be interested in examples
to study if they are available.

--
Regards,
Stephen D. Barnes

2005\12\06@131502 by Steve Rapinchuk

flavicon
face
A couple of years ago did a project for a client which included
implementing a Modbus slave (RTU) on a PIC18F252. At the time I remember it
was kind of strange that although Modbus is de facto standard, I couldn't
find any example code for a slave. (There was lots of code for a Modbus
master.) A few things I remember off the top of my head:

- Data is big endian
- Data is word based (two bytes); there's nothing in the spec about
floating-point values or strings, so I had to use trial and error.
- The freely available documentation isn't very thorough. There were no
examples of byte-for-byte messages including CRC. (This may have improved
since then.) I had to download a free PC-based Modbus master program, and
look at the data with a binary terminal program. My problem was that my CRC
bytes were swapped. Did I mention that modbus is big endian?
- The documentation includes lots of controller (mostly PLC) specific stuff
that doesn't apply for most implementations, so I didn't implement some of
the messages.
- Modbus messages don't include a start-of-message, length field, or
end-of-message.

Those are just a few of the things I remember at the moment, but I do
remember it was a pain. Anyone else out there who has implemented a Modbus
slave have similar experiences?



Steve

2005\12\06@134120 by Spehro Pefhany

picon face
At 10:14 AM 12/6/2005 -0800, you wrote:
{Quote hidden}

Did it (ASCII + RTU) with an 8051 variant a few years back. It's a pretty
simple protocol, but the way the RTU framing works I think I had to dedicate
an on-chip timer to it to meet the specs completely without using (ugh) delay
loops.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
.....speffKILLspamspam@spam@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
->> Inexpensive test equipment & parts http://search.ebay.com/_W0QQsassZspeff


2005\12\06@135037 by Mark Scoville

flavicon
face
> Stephen D. Barnes
>
> Thank you for the info! This is the starting point I was looking for.
> Any pointers to anything already done? I would be interested in examples
> to study if they are available.
>

I don't know of any examples, but I haven't looked for 6 years! I can't
share my code since it is work stuff :-(

One thing you will probably want to get your hands on is a copy of ModScan.
This is a handy little program that helps a lot with testing ModBus slave
devices.

When I did my initial implementation about 6 years ago (wow is it that old)
I used a 16C73B @ 20Mhz (I think). The first step was getting the PIC to
talk to ModScan using RS232. Next step was to add a RS-485 driver chip (and
tx/rx control) and talk to some real Industrial SCADA stuff.

Dig in and have fun.

-- Mark



2005\12\06@140638 by Stephen D. Barnes

picon face
Mark Scoville wrote:

{Quote hidden}

I've been looking around the net and found a few ideas. I will take your
advice and learn the protocol for both master and slave then take it
from there. BTW, is modscan freely available?

--
Regards,
Stephen D. Barnes

2005\12\06@140829 by Stephen D. Barnes

picon face
Mark Scoville wrote:

{Quote hidden}

I found the nodscan app at
http://www.win-tech.com/html/modbus.htm#MODSCAN if nayone is interested.

--
Regards,
Stephen D. Barnes

2005\12\06@142019 by Alex Shepherd

flavicon
face
> Thank you for the info! This is the starting point I was looking for.
> Any pointers to anything already done? I would be interested
> in examples
> to study if they are available.

How about this site:

http://www.modbus.pl/microchip.htm

Alex


2005\12\06@142543 by Mark Scoville

flavicon
face
> Of Steve Rapinchuk
>
> A couple of years ago did a project for a client which included
> implementing a Modbus slave (RTU) on a PIC18F252. At the time I

Hi, I've done an RTU slave implementation on the PIC 16C series and 17C
series in ASM - and also an 18F implementation in C.

> remember it
> was kind of strange that although Modbus is de facto standard, I couldn't
> find any example code for a slave. (There was lots of code for a Modbus
> master.) A few things I remember off the top of my head:

I think most of the slave code ends up being developed for
clients/employers - so it doesn't get out to the rest of the world (just my
guess though).

> - The freely available documentation isn't very thorough. There were no
> examples of byte-for-byte messages including CRC. (This may have improved

I thought the docs were Ok. The PM-MBUS-J-300 doc (or whatever it was) had
examples of byte-for-byte messages I think. I had the CRC bytes swapped
early on too :-)

> - The documentation includes lots of controller (mostly PLC)
> specific stuff
> that doesn't apply for most implementations, so I didn't
> implement some of
> the messages.

I didn't implement all messages either. Some of what makes sense for a "Big"
PLC doesn't make sense for a PIC.

> - Modbus messages don't include a start-of-message, length field, or
> end-of-message.

The end of a ModBus message is detected via a certain number of char times
of *silence* on the line. So you don't know when the end of the message is
coming - you just have to stash away the bytes in a buffer as you receive
them and when the line is "silent" or "idle" for 2.5 char times (I think)
then you consider the message complete and act on it. Some of this may be
inacurate based on 6 years of memory fade :)

>
> Those are just a few of the things I remember at the moment, but I do
> remember it was a pain. Anyone else out there who has implemented
> a Modbus
> slave have similar experiences?
>

Overall I wouldn't say my experience was a pain at all - it went pretty
smooth for me.

-- Mark



2005\12\09@093100 by Mark Scoville

flavicon
face
> Stephen D. Barnes:
> Thank you for the info! This is the starting point I was looking for.
> Any pointers to anything already done? I would be interested in examples
> to study if they are available.

Stephen I just came across this today... Have a look.

http://www.protocessor.com/techsupport/Free_Modbus_RTU_Source_Code.asp

-- Mark






2005\12\10@204720 by Stephen D. Barnes

picon face
Mark Scoville wrote:

>>Stephen D. Barnes:
>>Thank you for the info! This is the starting point I was looking for.
>>Any pointers to anything already done? I would be interested in examples
>>to study if they are available.
>>    
>>
>
>Stephen I just came across this today... Have a look.
>
>http://www.protocessor.com/techsupport/Free_Modbus_RTU_Source_Code.asp
>
>-- Mark
>
>
>
>
>
>
>  
>
Thanks for the link!

--
Regards,
Stephen D. Barnes

More... (looser matching)
- Last day of these posts
- In 2005 , 2006 only
- Today
- New search...