Interface AB Micrologix 1000 via Visual Basic

Status
Not open for further replies.

auto_mitch

Full Member level 3
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.Text = Input1
If Input1 = 0 Then
Shape1.FillColor = QBColor(12)
Else: Shape1.FillColor = QBColor(10)
End If
End Sub

mmohamed15

df1 visual basic micrologix 1000

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