04-17-2018 05:30 AM
Hi,
I'm developing my first DIAdem data plugin and I decide to choose LabVIEW to do this. There are couple of examples but they do not specify USI interface arguments such as: _ni_lv_usi_plugin_length, _ni_lv_usi_plugin_index, _ni_lv_usi_plugin_cacheId, _ni_lv_usi_environmentId, _ni_lv_usi_plugin_channelid, _ni_lv_usi_filename. The argument called Parameters is also quite enigmatic. The way these plugins works is also poorly described in LV_DataPlugin_SDK.pdf, so any additional info about the mechanism will be appreciated.
I would like to know what are these arguments for.
My final purpose is to create data plugin for Keithley 2701 which collects temperature on 80 channels. The data in DIAdem should have separate group channel for each DAQ channel since each DAQ channel measures temperature with a separate timestamp (samples are not at the same time so the data can't have single x-axis channel). Example data file in the attachment (item column should be skipped).
Thanks for your help in advance 🙂
Solved! Go to Solution.
04-17-2018 07:38 AM
Hi Bienieck,
Why don't you use the Text Dataplugin Wizard within DIAdem to create your dataplugin ? It is really simple and fast with that type of files.
I've never created a dataplugin using LabVIEW myself so I cannot help much with that but I'll try to find some information.
04-17-2018 08:09 AM
I tried, but I failed.
04-17-2018 08:25 AM
See attached images for direction on the configuration of the plugin 😉
04-17-2018 08:25 AM
I created also my data plugin in LabVIEW but I don't know how to plug it into DIAdem 😞
04-17-2018 08:29 AM
In the attachment, you can find how the tdm should look like, after loading the data with the plugin. Your instruction will create one group (if I understand it correctly) and I want a separate group for each data acquisition device channel.
04-17-2018 08:41 AM
Oh sorry, I thought you just wanted a separate channel for each column... My bad ! We'll find a solution 🙂
04-17-2018 10:26 AM - edited 04-17-2018 10:36 AM
I would strongly recomend to use VBS instead of labview.
The main reason is because the plugin will be a few kilobyte of afterwards and easy to install.
Your data looks like this:
Item;CH101_Temperature_C(1)(1);CH101_Time_RTC(1)(1);CH102_Temperature_C(1)(1);CH102_Time_RTC(1)(1);CH103_Temperature_C(1)(1);CH103_Time_RTC(1)(1);CH104_Temperature_C(1)(1);CH104_Time_RTC(1)(1);CH105_Temperature_C(1)(1);CH105_Time_RTC(1)(1);CH106_Temperature_C(1)(1);CH106_Time_RTC(1)(1);CH107_Temperature_C(1)(1);CH107_Time_RTC(1)(1);CH108_Temperature_C(1)(1);CH108_Time_RTC(1)(1);CH109_Temperature_C(1)(1);CH109_Time_RTC(1)(1);CH110_Temperature_C(1)(1);CH110_Time_RTC(1)(1);CH111_Temperature_C(1)(1);CH111_Time_RTC(1)(1);CH112_Temperature_C(1)(1);CH112_Time_RTC(1)(1);CH113_Temperature_C(1)(1);CH113_Time_RTC(1)(1);CH114_Temperature_C(1)(1);CH114_Time_RTC(1)(1);CH115_Temperature_C(1)(1);CH115_Time_RTC(1)(1);CH116_Temperature_C(1)(1);CH116_Time_RTC(1)(1);CH117_Temperature_C(1)(1);CH117_Time_RTC(1)(1);CH118_Temperature_C(1)(1);CH118_Time_RTC(1)(1);CH119_Temperature_C(1)(1);CH119_Time_RTC(1)(1);CH120_Temperature_C(1)(1);CH120_Time_RTC(1)(1);CH121_Temperature_C(1)(1);CH121_Time_RTC(1)(1);CH122_Temperature_C(1)(1);CH122_Time_RTC(1)(1);CH123_Temperature_C(1)(1);CH123_Time_RTC(1)(1);CH124_Temperature_C(1)(1);CH124_Time_RTC(1)(1);CH125_Temperature_C(1)(1);CH125_Time_RTC(1)(1);CH126_Temperature_C(1)(1);CH126_Time_RTC(1)(1);CH127_Temperature_C(1)(1);CH127_Time_RTC(1)(1);CH128_Temperature_C(1)(1);CH128_Time_RTC(1)(1);CH129_Temperature_C(1)(1);CH129_Time_RTC(1)(1);CH130_Temperature_C(1)(1);CH130_Time_RTC(1)(1);CH131_Temperature_C(1)(1);CH131_Time_RTC(1)(1);CH132_Temperature_C(1)(1);CH132_Time_RTC(1)(1);CH133_Temperature_C(1)(1);CH133_Time_RTC(1)(1);CH134_Temperature_C(1)(1);CH134_Time_RTC(1)(1);CH135_Temperature_C(1)(1);CH135_Time_RTC(1)(1);CH136_Temperature_C(1)(1);CH136_Time_RTC(1)(1);CH137_Temperature_C(1)(1);CH137_Time_RTC(1)(1);CH138_Temperature_C(1)(1);CH138_Time_RTC(1)(1);CH139_Temperature_C(1)(1);CH139_Time_RTC(1)(1);CH140_Temperature_C(1)(1);CH140_Time_RTC(1)(1);CH201_Temperature_C(1)(1);CH201_Time_RTC(1)(1);CH202_Temperature_C(1)(1);CH202_Time_RTC(1)(1);CH203_Temperature_C(1)(1);CH203_Time_RTC(1)(1);CH204_Temperature_C(1)(1);CH204_Time_RTC(1)(1);CH205_Temperature_C(1)(1);CH205_Time_RTC(1)(1);CH206_Temperature_C(1)(1);CH206_Time_RTC(1)(1);CH207_Temperature_C(1)(1);CH207_Time_RTC(1)(1);CH208_Temperature_C(1)(1);CH208_Time_RTC(1)(1);CH209_Temperature_C(1)(1);CH209_Time_RTC(1)(1);CH210_Temperature_C(1)(1);CH210_Time_RTC(1)(1);CH211_Temperature_C(1)(1);CH211_Time_RTC(1)(1);CH212_Temperature_C(1)(1);CH212_Time_RTC(1)(1);CH213_Temperature_C(1)(1);CH213_Time_RTC(1)(1);CH214_Temperature_C(1)(1);CH214_Time_RTC(1)(1);CH215_Temperature_C(1)(1);CH215_Time_RTC(1)(1);CH216_Temperature_C(1)(1);CH216_Time_RTC(1)(1);CH217_Temperature_C(1)(1);CH217_Time_RTC(1)(1);CH218_Temperature_C(1)(1);CH218_Time_RTC(1)(1);CH219_Temperature_C(1)(1);CH219_Time_RTC(1)(1);CH220_Temperature_C(1)(1);CH220_Time_RTC(1)(1);CH221_Temperature_C(1)(1);CH221_Time_RTC(1)(1);CH222_Temperature_C(1)(1);CH222_Time_RTC(1)(1);CH223_Temperature_C(1)(1);CH223_Time_RTC(1)(1);CH224_Temperature_C(1)(1);CH224_Time_RTC(1)(1);CH225_Temperature_C(1)(1);CH225_Time_RTC(1)(1);CH226_Temperature_C(1)(1);CH226_Time_RTC(1)(1);CH227_Temperature_C(1)(1);CH227_Time_RTC(1)(1);CH228_Temperature_C(1)(1);CH228_Time_RTC(1)(1);CH229_Temperature_C(1)(1);CH229_Time_RTC(1)(1);CH230_Temperature_C(1)(1);CH230_Time_RTC(1)(1);CH231_Temperature_C(1)(1);CH231_Time_RTC(1)(1);CH232_Temperature_C(1)(1);CH232_Time_RTC(1)(1);CH233_Temperature_C(1)(1);CH233_Time_RTC(1)(1);CH234_Temperature_C(1)(1);CH234_Time_RTC(1)(1);CH235_Temperature_C(1)(1);CH235_Time_RTC(1)(1);CH236_Temperature_C(1)(1);CH236_Time_RTC(1)(1);CH237_Temperature_C(1)(1);CH237_Time_RTC(1)(1);CH238_Temperature_C(1)(1);CH238_Time_RTC(1)(1);CH239_Temperature_C(1)(1);CH239_Time_RTC(1)(1);CH240_Temperature_C(1)(1);CH240_Time_RTC(1)(1); 1;23,9286728;2018-04-16 11:59:39;24,0977993;2018-04-16 11:59:39;24,0449562;2018-04-16 11:59:40;23,9829769;2018-04-16 11:59:40;23,6927109;2018-04-16 11:59:40;23,8615341;2018-04-16 11:59:40;23,7261448;2018-04-16 11:59:40;24,0891724;2018-04-16 11:59:41;24,1349983;2018-04-16 11:59:41;23,9184799;2018-04-16 11:59:41;23,7629013;2018-04-16 11:59:41;23,6689854;2018-04-16 11:59:42;23,6308613;2018-04-16 11:59:42;23,7178288;2018-04-16 11:59:42;23,7264633;2018-04-16 11:59:42;23,8126678;2018-04-16 11:59:43;23,5041046;2018-04-16 11:59:43;23,4879551;2018-04-16 11:59:43;23,8923225;2018-04-16 11:59:43;23,9391651;2018-04-16 11:59:43;23,9700012;2018-04-16 11:59:44;24,1556034;2018-04-16 11:59:44;24,2660694;2018-04-16 11:59:44;24,1525803;2018-04-16 11:59:44;24,0737019;2018-04-16 11:59:45;24,0937729;2018-04-16 11:59:45;24,0158463;2018-04-16 11:59:45;24,2566566;2018-04-16 11:59:45;24,2417412;2018-04-16 11:59:46;23,8331051;2018-04-16 11:59:46;23,6396999;2018-04-16 11:59:46;23,6937962;2018-04-16 11:59:46;23,6853638;2018-04-16 11:59:47;23,8974667;2018-04-16 11:59:47;23,9872761;2018-04-16 11:59:47;23,6922588;2018-04-16 11:59:47;23,9641857;2018-04-16 11:59:47;23,9354572;2018-04-16 11:59:48;23,9158058;2018-04-16 11:59:48;23,9764538;2018-04-16 11:59:48;24,4805164;2018-04-16 11:59:48;24,7329731;2018-04-16 11:59:49;24,9136047;2018-04-16 11:59:49;24,5858917;2018-04-16 11:59:49;24,5141411;2018-04-16 11:59:49;24,9010067;2018-04-16 11:59:49;24,8248978;2018-04-16 11:59:50;24,7452717;2018-04-16 11:59:50;24,5299358;2018-04-16 11:59:50;24,5647545;2018-04-16 11:59:50;24,4749622;2018-04-16 11:59:51;24,4510479;2018-04-16 11:59:51;24,5767727;2018-04-16 11:59:51;24,5503063;2018-04-16 11:59:51;24,8943672;2018-04-16 11:59:51;24,9028015;2018-04-16 11:59:52;24,7730846;2018-04-16 11:59:52;24,9921284;2018-04-16 11:59:52;24,7763691;2018-04-16 11:59:52;24,9062576;2018-04-16 11:59:53;24,6489277;2018-04-16 11:59:53;25,0068321;2018-04-16 11:59:53;25,2115135;2018-04-16 11:59:53;25,3876381;2018-04-16 11:59:54;24,82164;2018-04-16 11:59:54;25,2384167;2018-04-16 11:59:54;25,2138557;2018-04-16 11:59:54;25,0603657;2018-04-16 11:59:55;25,0864811;2018-04-16 11:59:55;24,8969631;2018-04-16 11:59:55;24,8203583;2018-04-16 11:59:55;24,8019142;2018-04-16 11:59:55;25,0110168;2018-04-16 11:59:56;24,8782291;2018-04-16 11:59:56;24,8082752;2018-04-16 11:59:56;24,8864155;2018-04-16 11:59:56;24,7946072;2018-04-16 11:59:57;24,4884071;2018-04-16 11:59:57;24,7719059;2018-04-16 11:59:57;24,2280617;2018-04-16 11:59:57; 2;23,9706059;2018-04-16 12:00:09;24,09091;2018-04-16 12:00:09;24,035059;2018-04-16 12:00:10;23,9907246;2018-04-16 12:00:10;23,8207493;2018-04-16 12:00:10;23,8463745;2018-04-16 12:00:10;23,8330135;2018-04-16 12:00:10;24,0926743;2018-04-16 12:00:11;24,1190815;2018-04-16 12:00:11;23,9080219;2018-04-16 12:00:11;23,7656307;2018-04-16 12:00:11;23,6621857;2018-04-16 12:00:12;23,6642361;2018-04-16 12:00:12;23,7476673;2018-04-16 12:00:12;23,7331562;2018-04-16 12:00:12;23,8054142;2018-04-16 12:00:13;23,5522118;2018-04-16 12:00:13;23,5658627;2018-04-16 12:00:13;23,9123001;2018-04-16 12:00:13;23,9555988;2018-04-16 12:00:13;23,9747314;2018-04-16 12:00:14;24,0998135;2018-04-16 12:00:14;24,2546387;2018-04-16 12:00:14;24,1363564;2018-04-16 12:00:14;24,0182285;2018-04-16 12:00:15;24,1105671;2018-04-16 12:00:15;23,9717522;2018-04-16 12:00:15;24,2752457;2018-04-16 12:00:15;24,2377777;2018-04-16 12:00:15;23,8610516;2018-04-16 12:00:16;23,6228352;2018-04-16 12:00:16;23,6927834;2018-04-16 12:00:16;23,6963844;2018-04-16 12:00:16;23,8918667;2018-04-16 12:00:17;23,9886951;2018-04-16 12:00:17;23,7336025;2018-04-16 12:00:17;23,9664478;2018-04-16 12:00:17;23,9328232;2018-04-16 12:00:17;23,9018383;2018-04-16 12:00:18;23,9653797;2018-04-16 12:00:18;24,533865;2018-04-16 12:00:18;24,7064495;2018-04-16 12:00:19;24,9176636;2018-04-16 12:00:19;24,5712528;2018-04-16 12:00:19;24,4904938;2018-04-16 12:00:19;24,8353062;2018-04-16 12:00:19;24,8256207;2018-04-16 12:00:20;24,7231064;2018-04-16 12:00:20;24,5768089;2018-04-16 12:00:20;24,5556927;2018-04-16 12:00:20;24,5335999;2018-04-16 12:00:21;24,4265842;2018-04-16 12:00:21;24,5810051;2018-04-16 12:00:21;24,5515709;2018-04-16 12:00:21;24,8857784;2018-04-16 12:00:22;24,8967113;2018-04-16 12:00:22;24,7939281;2018-04-16 12:00:22;24,9735432;2018-04-16 12:00:22;24,8022976;2018-04-16 12:00:22;24,9158077;2018-04-16 12:00:23;24,5039825;2018-04-16 12:00:23;24,800005;2018-04-16 12:00:23;25,1892147;2018-04-16 12:00:23;25,3859959;2018-04-16 12:00:24;24,6741695;2018-04-16 12:00:24;25,2538319;2018-04-16 12:00:24;25,2317638;2018-04-16 12:00:24;25,0997219;2018-04-16 12:00:25;25,0977268;2018-04-16 12:00:25;24,8945408;2018-04-16 12:00:25;24,8125744;2018-04-16 12:00:25;24,7993851;2018-04-16 12:00:25;25,0181694;2018-04-16 12:00:26;24,8756523;2018-04-16 12:00:26;24,6226807;2018-04-16 12:00:26;24,8706665;2018-04-16 12:00:26;24,8143082;2018-04-16 12:00:27;24,6305447;2018-04-16 12:00:27;24,8838844;2018-04-16 12:00:27;24,3744106;2018-04-16 12:00:27;
I used the following VBS code to create a plugin:
Option Explicit Sub ReadStore(File) File.Formatter.DecimalPoint = ","
File.Formatter.Delimiters = ";" File.Formatter.LineFeeds = vbCRLF File.Formatter.TimeFormat = "YYYY-MM-DD hh:mm:ss" if "Item" <> File.GetNextStringValue(eString) then RaiseError ' Not My file end if dim channelNames : channelNames = Array() dim channelName : channelName = File.GetNextStringValue(eString) while "" <> channelName redim preserve channelNames(UBound(channelNames) + 1) ' resize array channelNames(UBound(channelNames)) = channelName File.SkipValue ' Skip time heading channelName = File.GetNextStringValue(eString) Wend file.SkipLine Dim grpO : Set grpO = Root.ChannelGroups.Add(file.Info.FileName) Dim Block : Set Block = File.GetStringBlock() ' CSV block grpO.Channels.AddDirectAccessChannel(Block.Channels.Add("Item", eI32)) for each channelName in channelNames ' access them in the order of the CSV file dim valDA : set valDA = Block.Channels.Add(channelName, eR64) dim timeDA : set timeDA = Block.Channels.Add(channelName & "_time", eTime) ' first append time channel followed by data channel grpO.Channels.AddDirectAccessChannel(timeDA) grpO.Channels.AddDirectAccessChannel(valDA) Next End Sub
You can easily change to the code to create a group for each signal but I would not recommend a lot of groups because a series of channels is easier to maintain. You can also split the channelname and put parts into properties.
If you open the file with this plugin make sure you select it (Keithley_2701_CSV) or choose "open with" because the default CSV plugin can also load the file.
Hope this helps a little bit.
04-18-2018 05:00 AM
Thanks for the script. I used LV because I know it, so in theory, I should be able to deal with my initial problem quickly. Unfortunately, LV SDK for DIAdem is poorly described and I can't do what I need. On the other hand, I don't know VBS and to deal with my data I need to learn how to use it first...
But now I faced the situation where I need to get familiar with new language since LV solution does not work.
BTW The plugin weight is not that critical in these days - the time counts 🙂
04-18-2018 07:15 AM
Could you explain to me how blocks and direct access work?
For instance in line "grpO.Channels.AddDirectAccessChannel(Block.Channels.Add("Item", eI32))" you create direct access channel (whatever it means) for block named "Item". Must this name correspond to the header in CSV file? It seems that I can use "Channels.Add" with proper name and DIAdem automatically knows that the actual data is in the column (not row).
Could you comment on that?