Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Micrologix 1000 Control through RSLinx

Status
Not open for further replies.

bsauerwine

Computer
Jun 11, 2003
2
0
0
US
Hi:

I've been volunteering at my college's observatory to automate the use of the telescope and dome through computer. To control the dome, I used grant money to purchase a Micrologix 1000 1761 L10-BXB controller and RSLinx. Now I have the controller hooked up to relays and connected to the computer, and RSLinx Single Node installed as a service on the computer (running Windows 2000 SP3).

My goal now is to write a Visual Basic DDE application to the outputs on the controller to close the relays to control dome rotation. However, though I have successfully made DDE links to a RSLinx topic associated with the controller, the data I send doesn't change the state of the relays. My question is this: what are the DDE item names associated with the relay outputs on my Micrologix 1000 PLC? I can, it seems, change the value of O:0.0, for example, but I see no result on the controller. Does anyone have any sample VB code to turn relay outputs on an A-B PLC on and off?

Thanks,
~Ben Sauerwine
 
Replies continue below

Recommended for you

bsauerwine

I assume you do have Programming software for the Micrologix. I wouldn't recommend driving the output directly. Instead try using a bit in an integer data table to turn on the output. What is probably happening is that you are turning the output on, but the processor does not have an OTE instruction for that output so it subsequently turns it off. You will just need a simple rung for each output relay. Heres the text version of the rung to drive Relay 0 using data N7:0/0 from the data table.

XIC N7:0/0 OTE O:0.0/0

just replace the /0 with /1 through /15 for the remainder of the outputs.

Then use your VBA to turn on the bits in the N7 data table.

However, I don't know how sensitive your application is to time. If you can afford a slight delay before the relay turns on, I would use this rung

XIC N7:0/0 BST TON T4:0 1.0 1 0 NXB XIC T4:0/DN OTE O:0.0/0 BND

That will cause a 1 second delay before the relay activates, but it will protect your devices from damage if a comm error or bug causes the relay to cycle a couple hundred times a second. Just remeber to use a different timer for each ring T4:1, T4:2, etc.

Hope this helps

MadKungFu



 
Thanks for your help. I was thinking I could get off easy by directly modifying the outputs with VB. Later this week I'll try writing the ladder logic program and then modifying the N7 bits as you advised. This is the first time I've worked with a PLC, and I appreciate very much your time and expertise.

Thanks again,
~Ben Sauerwine
 
I have done something simular in a project I did this
send a 1 to N111 and bit 0 energizes
send a 2 to N111 and bit 1 energizes and turns off the other bits
send a 4 to N111 and bit 2 energizes and turns off the other bits
if you send a 0 to N111 it turns off all the bits
if you want two bits on at once send a 3 and bits 0 and 1 energize turning off all the other N111 bits


N111 O:0
-||------------------------------------(out)
0 0

N111 O:0
-||------------------------------------(out)
1 1

N111 O:0
-||------------------------------------(out)
2 2

N111 O:0
-||------------------------------------(out)
3 3

N111 O:0
-||------------------------------------(out)
4 4

this worked for me
don
 
Status
Not open for further replies.
Back
Top