Automation and Plugin problem

Vincent Yang

Posted on 10.02.2017 12:21

Hi Support Team,

I have a few questions about Automation and Plugin. The version of DEWEsoft is 7.1.2.

1. Is the automation application possible to read channel data in analysis mode? Any examples?

2. Is the automation application possible to capture the event of "play button pressed" in analysis mode?

3. I wrote a plugin to create a "Variable size text" channel (from C# String Channels example ) and a automation application to insert string data.

But I found 2 weird thing.

First, This channel is async, but after export to txt, the data of this channel becomes synchronous.

Secnod, I found some bytes was missing in the exported txt file.

Below is the code how I create the channel and in the automation application the AddAsyncString was used to insert channel string data.

app->get_Data(&data);
data->get_Groups(&groups);
groups->get_Item(8, &group);
group->QueryInterface(IID_IPluginGroup, (void **)&pluginGroup);

pluginGroup->MountChannel(12, TRUE, -1, &hexCh);

hexCh->SetAsync(TRUE);
_bstr_t hexChName = "string data";
hexCh->put_Name(hexChName);
hexCh->put_Used(TRUE);

hexCh->put_MType(5); // text display
hexCh->put_BinAvgSampleSize(4000);

Is the above code correct?

Thanks in advance for your help !


DEWESoft Support
Technical support
Posted on 15.02.2017 10:44

Hi,

a plugin can only be used for offline recalculation in analysis. You can't use other functions through a plugin in analysis. You can however write a DCOM application, which is able to read data in analysis just like you would through acquisition.

The text export is a value based export, which means that it will convert asynchronous channels to synchronous. That is the reason that your channel is changed between the DEWESoft view and the exported data. The only way that a channel will stay asynchronous in the text export is if you're only exporting one channel. As soon as you add a second one, both will be converted to synchronous samples. If that didn't happen, then you'd be left with a lot of unaligned data points.

Vincent Yang

Posted on 16.02.2017 12:13

Hi,

I wrote a plugin to create a string channel and insert string data (AddAsyncString), it works fine.

The length of the string is 4000 byte and update rate is 10Hz.


How can I read the data of this string channel from external DCOM application?

I tried to use the GetDataValues method of IChannelConnection, but I only can get first string.

The remain data are always 0.

Could you kindly show me some examples?

Thanks!


Vincent Yang

Posted on 17.02.2017 05:06

The following picture is from Export function of DEWESOFT.

The channel "Channel 0" is the string channel which I want to read from DEWESOFT in measurement mode.

I found the data type is vector.

Can I read a vector channel from DCOM application in measurement mode?

Thanks!


Attached files:
Login to reply to this topic. If you don't have account yet, you can signup for free account .