InTouch - send/receive HEX numbers

P

Thread Starter

Peter Bubik

Hi, I need to write an InTouch HMI that communicates with hardware via a serial port in hexadecimal values.Right now I have a command line program that does that this (it sends 3bytes of hex values and waits for 24byte reply), For example: if I write to the serial port: F1 71 A2 it will return 24 bytes describing the status of the hardware. I need to write an HMI for it so that it would be human readable even for our operators. I would like to plug it into an InTouch HMI. Any ideas how to do this? Is this even possible? Has anyone done anything this wacky? Thanks Peter
 
A

Alex Pavloff

This is a very standard thing, not wacky at all. I believe that Wonderware Intouch supports ActiveX controls... so you could write one (or hire someone to write one) that used MSComm to throw those three bytes out a com port and then read the response, and then display that value. If you don't know what I just said, I would recommend finding someone to do it for you. :)
 
A

Anthony Kerstens

To my knowledge, Intouch doesn't have a hex tag type. Assuming you have the right I/O server, you will have to write a script to build the hex sting in a message type tag. Another option is ActiveX, since Intouch is an ActiveX container. Check it out carefully because ActiveX objects have to follow Intouch's rules. A final last ditch option, and all around ugly, is to do a dde conversation with an excel sheet and the dec2hex function. (I did say it's ugly.) Anthony Kerstens P.Eng.
 
I

Ing. Jairo Rodriguez

You need to get the Wonderware DDTK (Driver Dveloment Tool Kit) to make and comunication protocol driver to use a personal data frame.
 
D

Dennis Murphy

Dear Peter, This is not a wacky thing you're asking for. We have two alternatives for you. First, use Omniserver from DSSI. They are in Atlanta, GA and allow you to talk DDE to their server. It is a simple hex type serial server that is programmable. You set the messages that Omniserver will get throught the comm port (both ways) and it translates the values into integers (base 10) from hex for you. It then makes those integers available as a DDE Item. You can download a trial of their software for free from www.omnidssi.com. Second, InTouch does have a function that takes a hex string and turns it into a decimal number. It is called "StringToInteger()" and you get to set the base of the string translation. So therefore, if you set the base to 16, it assumes that a 9 is a 9 and an A is a 10. If you set it to base 8, then a 7 is a 7 and an 8 is not accepted. In that case a 10 would be an 8 and so on... It is not as easily created in scripting as it would be to use the Omniserver. I suggest you look at that alternative first. One final thought, the Wonderware Forums are free and available on the web. You may want to direct specific InTouch questions to that board. They will be responded to by Wonderware engineers. Thanks. Dennis Murphy
 
P
Alex, I know what you are saying, and it sounds exactly as what I need, but I have never done it. Where would I start with learning how to make ActiveX stuff. Is it really involved or is it more like click-and-drag type of programming? Any suggestions on where to start? Thanks Peter > This is a very standard thing, not wacky at all. I believe that Wonderware Intouch supports ActiveX controls... so you could write one (or hire someone to write one) that used MSComm to throw those three bytes out a com port and then read the response, and then display that value. > > If you don't know what I just said, I would recommend finding someone to do it for you. :) >
 
J
Peter, You can build simple activeX controls using Visual Basic. (yeah yeah C++ purists I know about the VB runtime dll baggage, but sounds like peter is after fast time to market) - I can recommend a good book oriented towards the VB programmer called VB COM -- publisher is WROX -- shows the VB programmer how to build controls -- i got a dozen "ah hahs" a chapter when I read it a few years ago -- really opened up some ideas -- you can find it in any online bookstore or local barnes & noble. John Weber Software Toolbox
 
Top