Previous in Forum: Computer Engineering - Poject Request Urgent help   Next in Forum: Gerber Files????
Close
Close
Close
6 comments
Member

Join Date: Mar 2007
Posts: 6

Setting up an IO device

04/16/2007 1:23 AM

I just got an H2-EBC, with two 16 input modules, a 24V DC power supply, with a 4 slot DL 205 base from Automation Direct.

I need a bit of help in getting it set up and talking with my PC. There is no "PLC" here because I don't need to "process" any data. I just need to read the status of the inputs and be able to get this data in the computer.

I managed to get it all set up with power, hooked up from the power supply to a switch, then to the input modules, and I can flip the switch and watch the lights on the input modules turn on and off - a milestone.

I even managed to assign the thing an ethernet address and I plugged it in to my computer with a serial cable and the DirectSoft program recognizes it for what it is - an Ethernet Base Controller.

Now - what I need to accomplish is reading the status of the 32 input "switches" - I need to know if each of them are ON or OFF - open or closed. How do I go about this the smartest?

Keep in mind that there is no CPU here as I don't need any processing. I just need the statuses of each of these switches fed into my computer. And I don't want to depend on a propritary Win32 program if I can help it as I need these PLCs to be able to be set up on many different computer systems and I don't want to have to go around setting up this program on each of those PCs.

Any help will be much appreciated.

- Bret B

Register to Reply
Pathfinder Tags: engineering IO PLC programming
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Associate

Join Date: Jan 2007
Location: Edmonton, Alberta, Canada
Posts: 48
#1

Re: Setting up an IO device

04/17/2007 12:32 AM

My first question was... why will directsoft software not offer the options you require?

So I googled the following.

http://support.automationdirect.com/demos.html#ds5

ds100 is available... is this a posibility?

There are manuals available.

y

Register to Reply
Guru

Join Date: Jul 2006
Location: Silicon Valley
Posts: 5356
Good Answers: 49
#2

Re: Setting up an IO device

04/17/2007 3:20 AM

Do you have an Ethernet connection on your PC. If yes, have you tried connecting it via a cross-over cable to your PC via Ethernet? Of course, then you're probably going to need to delve into the darker reassess of NDIS and many levels up the ISO stack!

Are you proficient in programming or are you a non-programmer? If you're the latter, forget it! Find a shareware stack that will allow you to read the inputs from the Ethernet port (after all, why give it an Ethernet address if you're going to read it through the serial port?!).

Also, there's really a lot of difference how a Windows verses a MAC verses a UNIX machine handles this stuff. I hope you're an expert in each platform!

Sorry, don't mean to be negative, but you're biting off an awfully large chunk. Just hope you have big programming choppers.

__________________
"Perplexity is the beginning of dementia" - Professor Coriolus
Register to Reply
Power-User

Join Date: Nov 2006
Location: SE MI USA
Posts: 105
#3

Re: Setting up an IO device

04/17/2007 5:22 AM

Contact automation direct via their hotline.

Register to Reply
Anonymous Poster
#4

Re: Setting up an IO device

04/17/2007 4:41 PM

"I don't want to depend on a proprietary Win32 program if I can help it as I need these PLCs to be able to be set up on many different computer systems and I don't want to have to go around setting up this program on each of those PCs."

Hrmmm, this could be a problem. Since this is ethernet, the PC controller recommended will most likely broadcast a request for a specific property to the unit with said IP, which in turn will broadcast a response...

INPUT1.STATE or INPUT1->STATE ,,,

The unit will not constantly flood the network with this info, you need to request it. The proprietary software will most likely incorporate communication protocols with OOP (object oriented programming),,, visual C++, VB, or a client package of some sort....

You will at the very least need an object model of the device if you do not want to use their software.

Register to Reply
Member

Join Date: Mar 2007
Posts: 6
#5

Re: Setting up an IO device

04/18/2007 12:51 PM

Thanks everyone. We actually figured this out.

Here's the short story of how:

When a message (socket connection and DatagramPacket) is sent to the EBC (Ethernet Base Controller) that has a certain length and is what it is expecting, it will respond with its current state, with all the data I need. Including the state of all of its switches.

So that's exactly what we did. Sent it a packet of data that it was expecting, and then got the response back. At first it looks like total gobldegook, but when you look at it in wireShark, you can see the bytes. That's the key. For us and our equipment, it was finding the byte that had what equated to a "3" in the first four bits of a byte, then the remaining four bits in the byte contained the number of sets of eight inputs that that slot contained. Then we just got the content of the next two bytes and that was the status of that slot.

Then, by looking for the next instance of "3", we find the next slot, and repeat the process. It is made much easier by the use of "for" loops and conditional statements.

The trick to decoding the bytes that come back is taking the value, such as "0b", going to Calculator, putting that is as a Hex value, then pressing the "Bin" radio button which converts that hex value into a binary value. That gives the 01010101 type data. That is the status of the eight switches in that group, 0 is Off, 1 is On.

I hope that helps someone at some point in time down the road.

Thanks for everyone's input, it helped.

- Bret B

Register to Reply
Guru

Join Date: Jul 2006
Location: Silicon Valley
Posts: 5356
Good Answers: 49
#6
In reply to #5

Re: Setting up an IO device

04/19/2007 12:26 AM

Congratulations!!! Too often these type of situations end in hiring a computer guy to code it up. But, hey, you should really be proud! Good luck!

__________________
"Perplexity is the beginning of dementia" - Professor Coriolus
Register to Reply
Register to Reply 6 comments
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Copy to Clipboard

Users who posted comments:

Anonymous Poster (1); BretB (1); jstolaruk (1); vermin (2); y eye (1)

Previous in Forum: Computer Engineering - Poject Request Urgent help   Next in Forum: Gerber Files????
You might be interested in: M-Modules, PMC and XMC Modules, PC/104 Modules

Advertisement