Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Ellis

Pages: [1]
1
Hello all,

First off, let me just say that I have almost no experience in this realm, so I'd appreciate your patience. :-\

I am attempting to programmatically access values from an Omron CJ1M CPU13. I want to access the data over ethernet, so I'm using the AdvancedHMIDrivers.Omron.OmronEthernetFINSCom driver (named Line1). Here is my handler code:

Code: [Select]
Private Sub Line1_DataReceived(sender As Object, e As PlcComEventArgs) Handles Line1.DataReceived

        Console.Write(e.PlcAddress + " ")
        For i As Integer = 0 To e.Values.Count - 1
            Console.Write(" " + e.Values(i))
        Next
        Console.WriteLine()

End Sub

From this I get the output:
D4 va0, val1, val2...etc.

As you can see, I'm just writing the values from the PLC to stdout. Here is my question though: is e.PlcAddress the starting address, and every value following that one is the next address? For example, I start at location D4, so I'm assuming Values(0) is D4. Would Values(1), Values(2)...Values(n) match up to D4, D5...Dn? It doesn't seem to be contiguous. So, I guess in so many words, I'm wondering: is there a way to get the e.PlcAddress for each one of the values of Line1.DataReceived?

Thanks in advance,
Ellis

Pages: [1]