Hi there,
I am experimenting an opc example with Kepware from the help of the utgard website: "https://openscada.atlassian.net/wiki/display/OP/HowToStartWithUtgard"
The following code is part of my example:
// connect to server
server.connect();
// add sync access, poll every 500 ms
final AccessBase access = new SyncAccess(server, 500);
access.addItem(itemId, new DataCallback() {
@Override
public void changed(Item item, ItemState state) {
System.out.println(state);
}
});
// start reading
access.bind();
// wait a little bit
Thread.sleep(10 * 1000);
// stop reading
access.unbind();
The program connects and runs successfully
There are times where I actually receive values of boolean tags that are either true or false (1 or 0) but this is rare.
However I mainly receive the following line:
Value: [[org.jinterop.dcom.core.VariantBody$EMPTY@d60b970]], Timestamp: Wed Feb 18 22:58:23 GMT 2015, Quality: 0, ErrorCode: 00000000
is there an explanation why I receive this?
Nevertheless, my main question is the following.
The example is focused on getting values of a same tag over a certain period of time.
Is there any way to get data without specifying a time period?
Thanks in advance.
Kind regards
Seong
--
You received this message because you are subscribed to the Google Groups "openSCADA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openscada+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi,
Well if you need only a one time read you can use the low level api. Just look into the source of SyncAccess.
Jens
Group group = server.addGroup ( "test" );
group.addItem ( "Saw-toothed Waves.Int2" );
group.addItems( "Saw-toothed Waves.Int2", "Saw-toothed Waves.Int4" );
access.addItem(itemId, new DataCallback() {
@Override
public void changed(Item item, ItemState state) {
// System.out.println(state); // System.out.println(item);