Discussion:
I can't get DSC data logging to work!
(too old to reply)
knicewar
2008-08-13 15:40:08 UTC
Permalink
I admit I'm a newbie to LabView and DSC, but I've tried everything in the help guides to get it to work and nothing ever shows up in the database.  First off, I tried just clicking the "Enable Logging" checkbox for a shared variable and ran a simple VI that's publishing analog waveforms to that SV (and yes I ran a consumer VI that verified the values are being updated).  This didn't work (nothing shows up in my historical data under MAX).  So I followed the instructions for creating a dataset (whatever THAT is -- the documentation didn't make it clear if I really needed a dataset or datasource or what they are for that matter).  That didn't work.  So I created a new DB and set up a datasource/dataset for it.  That didn't work either. What gives?  Is there something else I need to enable?  What's the simplest way to test data logging?  Do I need a dataset? 
Robst
2008-08-13 16:40:07 UTC
Permalink
Hello knicewar: I wonder if you have enabled datalogging in the library where the shared variable is located. To do so, right click on the library and select properties. Then select the category DSC Settings: Database and check Enable Datalogging. Then select the database you want to log data to. Let me know if this helps. Greetings. Robst.


Project Library Properties.JPG:
http://forums.ni.com/ni/attachments/ni/170/349034/1/Project Library Properties.JPG
knicewar
2008-08-13 16:40:08 UTC
Permalink
Yes, I have it enabled in the SV lib and it's pointing to my DB.  But I found the problem: I had disabled auto-deploy when I was testing something else but hadn't reenabled it (don't I feel stupid).  So now the SVs show up in MAX.  But the new problem is that I can't see any data in the trace!  The times are correct, reflecting when I started and stopped the VI.  But there are no lines displayed.  Zooming in and panning around don't help.   How do the SVs get stored?  I only see the SV names under the DB, not individual runs.  If I click view data, that creates a trace, which I had assumed was simply a view into the DB.  But it only seems topick the most recent run for the SV.  If data was showing in the trace, and I moved the start time earlier, would I see all the runs or just the most recent? Thanks. 
knicewar
2008-08-13 17:10:06 UTC
Permalink
More info: the trace shows the SV in the legend but has "(No Data)" at the end (wasn't obvious until I scrolled all the way over).  This is a waveform SV.  When I added some non-waveform boolean SVs, those do show up in the trace.  Are waveforms not supported in historical logging?? 
Robst
2008-08-13 17:10:06 UTC
Permalink
Hello: Glad you've found the problem.  And, about the other one... well as far as I know, the SVs logging is based on value change. If the value of the SV changes more percent than the one specified in the Logging category of the SV properties, the DSC engine will log a new value. Make sure that the value is changing enough. And another idea, make sure you're locating the database in an accesible location.  Once I had a problem and I couldn't log data in a BD located in a folder inside C:\Program Files. Just for testing you may try to create a DB in a location like c:\bdtst. Let me know if this helps. Robst.
knicewar
2008-08-13 17:10:07 UTC
Permalink
Where do I find the value change spec?  I don't see anything in the waveform SV properties ... 
knicewar
2008-08-13 17:10:08 UTC
Permalink
Oh are you talking about the update deadband?  It's apparently not available for an array of waveforms (but is for other types).  :-(  Does this mean there is no way for me to log my data to the DB?  
Robst
2008-08-13 17:40:05 UTC
Permalink
Hello: Yes, I've checked it out and it's not available for a waveform SV. I've done some tests in my PC and I'm also unable to view the data in MAX. But I see in the properties of the SV in MAX that some data appears to be there, although it doesn't show in the trace view. Maybe using some of the VIs located in the Historical pallete of the DSC Module you can manage to retrieve the data. I haven't found anything that says that you can't log waveform data. Anyone out there may help us with this.
Jeremy_B
2008-08-14 20:10:09 UTC
Permalink
Hi knicewar,&nbsp;The data view in MAX can't display waveforms, but the data is logging.&nbsp; To view it, you can use a Read Trace VI from your DSC palette and set the polymorphic selector Variant, extract the data from the cluster, index through the array of variants, and then convert the variant to a waveform.&nbsp; I've attached a screenshot.&nbsp;<img src="Loading Image..." border="0">&nbsp; Message Edited by Jeremy_B on 08-14-2008 03:01 PM


DSC Variant to Waveform.jpg:
http://forums.ni.com/ni/attachments/ni/170/349433/1/DSC Variant to Waveform.jpg
knicewar
2008-08-14 22:40:18 UTC
Permalink
Hm.&nbsp; It crashed my machine after sucking down every bit of memory.&nbsp; Perhaps it should &quot;window&quot; the DB requests (bound the start/stop time) because I have a LOT of data in it ...&nbsp;Surely I'm not the first to want to browse waveforms from a huge DB.&nbsp; Isn't there something already out there I can use??&nbsp;Keith.&nbsp;
unclebump
2008-08-15 10:40:18 UTC
Permalink
Do you have Diadem from NI?? When I used DSC 7.0, I flattened&nbsp;arrays into a binary string and wrote that data into Citadel. Not as convenient because you have to decode the historical data before viewing. I was monitoring cycles of data as we were making parts, not monitoring a long term trend.
Jeremy_B
2008-08-15 18:10:07 UTC
Permalink
Hi Keith,&nbsp;The Read Trace VI has a time interval input that lets you select a subset of your data to return.&nbsp;
unclebump
2008-08-15 18:40:07 UTC
Permalink
You might not be able to use the DSC module with the waveform data type. I found this info on the NI website.&nbsp;The ways in which you can configure shared variables varies depend on the data type. Specify the data type of a shared variable on the Variable page of the Shared Variable Properties dialog box. You can use features the LabVIEW DSC Module adds with shared variables of the following data types: Double&mdash;A continuous value representation of a connection to a real-world input/output point. This type of shared variable can vary continuously over a range of values within a signal range. Use a double shared variable when you want to express a continuous value, such as 0 to 100. Boolean&mdash;A two-state (ON/OFF) value representation of a connection to a real-world input/output point. This type of shared variable can have a value of either 1 (TRUE) or 0 (FALSE). Use a Boolean shared variable when you want to express a two-state (ON/OFF) value. U32 Bit Field&mdash;A multiple-bit value representation of a connection to a real-world input/output point. This type of shared variable can consist of up to 32 discrete values. Use a U32 bit field shared variable when you have a multiple-bit value in which each of the bits represents a flag or single value that is turned on or off. The maximum length of a U32 bit field shared variable is 32. LabVIEW stores a bit field as a number that you can see in the National Instruments Shared Variable Monitor, but the bit field is an array of bit values. String&mdash;A string shared variable is an ASCII or binary character representation of a connection to a real-world input/output point. Use a string shared variable when you have binary information or an ASCII value. When you configure a string shared variable, you must select whether to treat the data in the shared variable as text or binary information. For example, you can use a string shared variable to obtain values from a bar code reader or if you have data that does not fit into any other data type. You also can use a string shared variable for PLC control strings and PLC reporting strings. You cannot use scaling or add alarming other than bad status alarms with string shared variables. LabVIEW also includes many additional data types for shared variables. Support of DSC Module features, such as scaling and alarming, for the additional shared variable data types is limited. National Instruments recommends that you use one of the above shared variable data types if you want to use the data logging features included with the DSC Module.
Jeremy_B
2008-08-15 19:10:05 UTC
Permalink
The Citadel database natively supports the datatypes used in DSC, however, it can log any datatype that you can have for a shared variable.&nbsp; If you use a datatype that the database does not natively support, it will store it as a variant, and it is up to the user to convert the variant data back to its original datatype.&nbsp;Unclebump is correct in that the DSC module only supports a subset of datatypes, and has limited support for the rest.&nbsp; To summarize, you can log anything, but you might have to convert it manually, and some of DSC's features will only work with its supported data types (such as alarms or scaling).
Continue reading on narkive:
Loading...