Need help connecting to Allen-Bradley MicroLogix 1100


Recommended Posts

As the title says, I was hoping I could get help connecting an Allen-Bradley MicroLogix 1100 PLC to DAQFactory. The bulk of the programming is running through the PLC, but the main stuff I need help with is getting DAQFactory to communicate with the PLC, to be able to read the information coming from the PLC, and occassionally being able to flip switches to say start a motor or begin collecting data.

Thanks in advance.

Link to comment
Share on other sites

I'm not sure. This is the first time I've ever used a PLC and someone else did the programming for it. So, I have been put to the task of getting DAQFactory to work with it. If it is just a matter of choosing one, whichever one is easiest to get working. I'm going to be using an ethernet to usb adaptor if that makes a difference.

Link to comment
Share on other sites

Unfortunately, you are going to have to figure out the PLC programming first, including what registers are where. Then you can decide which protocol to use (it will have to be Modbus or DF1). What do you mean by an Ethernet to USB? Did you mean Ethernet to serial?

Link to comment
Share on other sites

  • 2 weeks later...

So, I am still having issues getting communications between the PLC and DF.

The configuration that I have for the PLC IS:

Connection Name: ML1100

Port: 3

Baud: 19200

Byte Size: 8

Parity: None

Stop Bits: 1

Timeout: 1000

Flow Control: None

In the comm monitor, the only responses that I am receiving back are the exact same with the exact same time:

Tx (11:54:35.593): B3:0/1

Rx (11:54:35.593): B3:0/1

Tx (11:55:34.211): B3:0/0

Rx (11:55:34.211): B3:0/0

The last 0 and 1 should switch a motor on and off, but there is no response.

Any ideas/suggestions on getting this to work?

Link to comment
Share on other sites

Chances are you have issues with the PLC programming, but I can't say. I'm not really an expert on that particular PLC. It looks, however, like you might just be getting an echo. You might try going to the comm monitor and just typing in some garbage and seeing if it echos back in the Rx.

Link to comment
Share on other sites

  • 3 weeks later...

No, serial. If you had the wires crossed on Ethernet you wouldn't get anything. With a serial / ethernet you have both ethernet and serial. Most likely your wiring problem is on the serial side. Its also possible that the serial / ethernet converter has a setting that causes it to echo.

Link to comment
Share on other sites

I can't say. You have a hardware issue, not a DAQFactory software issue, and unfortunately will likely have to post on an Allen Bradley forum or contact their tech support. DF1 is DF1 and DAQFactory talks DF1. The issues you are having relate to getting the DF1 connected between the PC and the PLC. It would be like if we were chatting on the phone and lost the connection. We are both talking English, so can communicate, but if the hardware goes down that supports the phone call, we aren't going to get very far.

Personally, I'd start by eliminating the ethernet to serial converter and just go serial out of your PC directly into the PLC. Then you will know whether the issue is with the PLC or the converter. Then you can work from there.

Link to comment
Share on other sites

So, working with the PLC programmer, we got the PLC and DAQFactory talking with the use of an Allen-Bradley adaptor. The one line of code that we could get working was from the bottom of page 8 in the Serial Guide included with DAQFactory. The problem is that the line is entered as

\016\002\001\000\015\000\042\000\162\002\007\137\000\000\016\003\136\065 and I don't know how to decifer it and put it into something that I can use. What does that line say?

Thanks!

Link to comment
Share on other sites

So, here is what I am trying to accomplish, maybe you can point me in the right direction with this.

The operator presses a button to start the motors on. Upon each set of measurements completing, the data is placed into N7:0, N7:6, and N7:7 and sets a bit (B3:1/0) to signal that the data is ready to be transfered over. So when the bit goes high, DAQFactory requests data from N7:0, N7:6, and N7:7. This will repeat until the operator presses a button to finish the processes and stop the motors.

We were able to setup a local OPC server on the machine and at least pull the tags into DAQFactory, but I have been unsuccessful in being able to get any values besides a -1 for the motors and 0's for the other values. Are there any suggestions as to being able to get either of these to work?

Link to comment
Share on other sites

OPC is weird. Its built on COM which kind of came out of VB, and so they often use -1 for true instead of the normal 1 used by most every other programming language. So, most likely if you are getting 0's and -1's, its working, you just need to take the abs() of the result to get 0 and 1, and remember when setting, to use -1 for on instead of 1. I haven't run into this in a while, so I could be wrong. I have this vague notion that -1 was used instead of 0 for false. Anyhow, its something like that and its all related to OPC, not DF1.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.