Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Interface AB Micrologix 1000 via Visual Basic

Status
Not open for further replies.

auto_mitch

Full Member level 3
Joined
Oct 14, 2004
Messages
172
Helped
16
Reputation
32
Reaction score
3
Trophy points
1,298
Activity points
1,240
visual basic micrologix

Hi all!
I have a problem with micrologix 1000 interface. i want to get the status of each Input or Output of the device. The communication between PLC and PC is accomplished through DDE protocol. This part works fine. The program reads the bit which corresponds to the I:0/0 Input and shows it's status 0 or 1 to a text. I also want that, when the text's value will be 0, a Shape object (circle) will become red, and the opposite, when the text's value will be 1, a Shape object (circle) will become green. My problem is that when the text change the shape's color is still red. could you please help me? Thanx for your time!

Code:
Private Sub Form_Load()
Dim Input1 As Integer

Text1.LinkTopic = "RSLinx|My_Prog"    ' Set the application name and topic name.
Text1.LinkItem = "N7:22/0"                 ' Set LinkItem.
Text1.LinkMode = vbLinkAutomatic       ' Set LinkMode to Automatic.
Text1.LinkRequest                               ' Update text box.

Text1.Text = Input1
If Input1 = 0 Then
Shape1.FillColor = QBColor(12)
Else: Shape1.FillColor = QBColor(10)
End If
End Sub
 

mmohamed15

Advanced Member level 4
Joined
Mar 23, 2005
Messages
112
Helped
5
Reputation
10
Reaction score
0
Trophy points
1,296
Activity points
2,116
df1 visual basic micrologix 1000

are you sure that your program received the data i can't see the communication protocol in your code
 

hn1

Advanced Member level 4
Joined
Oct 28, 2006
Messages
105
Helped
5
Reputation
10
Reaction score
0
Trophy points
1,296
Activity points
1,872
micrologix 1000

You should set the link to DF1 full duplex and try to see what is the baudrate supported by the PLC.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top