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 - stenej

Pages: [1]
1
Support Questions / reading a UDT
« on: February 13, 2016, 06:25:41 PM »
I just downloaded this product today and am trying to figure things out...
I have a UDT consisting of:
            Int32 SId;
            Single xL;
            Single yL;
            Single turn;

I have been able to read and write to the UDT using these methods (c#);

private AdvancedHMIDrivers.EthernetIPforCLXCom m_Plc;
m_Plc = new AdvancedHMIDrivers.EthernetIPforCLXCom();
m_Plc.IPAddress = "1.3.8.17";
m_Plc.ProcessorSlot = 0;

string [] sVal = new string [1];
sVal = m_Plc.Read("DyComplete[0].Sd", 1);

Then i go through the rest of them, reading the individual UDT member

And then the same for writing to the UDT.  I need to write the individual UDT member.

My question is I was hoping/thinking I could read the entire UDT with a single read.  Something like;
string [] sVal = new string [1];
sVal = m_Plc.Read("DyComplete[0]", 4);
But when I do that, i get errors.

Is that not possible?
Again, I just started working with this today, but could not find alot of help in the forums on UDTs

Thanks!

Pages: [1]