I need some help with my syntax. I want to write to a single digital line. My object is m_digital24 with all ports configured as outputs in the property sheet of the CWDIO control.
For a single port update the following works good:
m_digital24.GetPorts().Item(CNiVariant(0)).SingleWrite(CNiVariant(0xAA));
This makes sense to me. You first say that you are working with ports then you select the port number to use with the Item() function and write to it with the SingleWrite() funciton.
Using the same logic the following code seems that it would work. It doesn't seem to do anything however.
m_digital24.GetLines().Item(CNiVariant(0)).SingleWrite(CNiVariant(1));
logic: Say you are working with lines, select line 0 and set th
e status of the line. Where do I get to say what port I want to work with? It seems I am either in CWDIOPorts or CWDIOLines and I need to configure both to select a particular line.
Thanks,
Grant
Grant M. Johnson
Project Engineer
LECO Corporation