Micrologix 1000 Control through RSLinx
Micrologix 1000 Control through RSLinx
(OP)
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
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





RE: Micrologix 1000 Control through RSLinx
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
RE: Micrologix 1000 Control through RSLinx
Thanks again,
~Ben Sauerwine
RE: Micrologix 1000 Control through RSLinx
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