LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamp Data Type is wrong

Solved!
Go to solution

The attached code is supposed to look at a cluster and read the name and datatype of each control in the cluster.  When I put a timestamp control into the cluster it returns its data type as waveform, I thought that timestamp was its own data type.  I need to get the correct data type as I am using this to populate a database.  I need to be able to differentiate between a timestamp data type and a waveform as I dont want to insert a data with waveform datatype into the database as a timestamp and I dont want to insert a timestamp into a spot where waveform data should be.  Any ideas?

 

 

Message Edited by jmcbee on 02-23-2009 09:15 AM
Download All
0 Kudos
Message 1 of 11
(3,946 Views)

Forgot to attach the subVI...

0 Kudos
Message 2 of 11
(3,936 Views)

Here is a better illustration of my problem:

 

 

 
 
 
 
 
 
 
 
 
 
Message Edited by jmcbee on 02-23-2009 09:36 AM
0 Kudos
Message 3 of 11
(3,925 Views)
Solution
Accepted by topic author jon_mcbee

One of the subVIs is password protected and that is the one which generates the error.

 

Using the Class ID and Class Name properties seems to work OK, producing ID = 60 and Class Name = AbsTime for the timestamp and ID =47 and Name = WaveformData for a waveform control.

 

Lynn 

Message 4 of 11
(3,917 Views)
Thank you johnsold, I did not know that I could use Class ID and Name to get this info.  Can you tell me where I can get more info on the Class ID property, what do the values map to?
0 Kudos
Message 5 of 11
(3,904 Views)

johnsold wrote:

One of the subVIs is password protected and that is the one which generates the error.

 

...

Lynn 


And that one VI is part of VI.lib so this is a bug.

 

A work-around could mod "get Type of Control" to handle the special case where the "ClassID" is "60".

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 11
(3,903 Views)
I agree, I am going to implement that work around right now. 
0 Kudos
Message 7 of 11
(3,898 Views)
I think the fundamental problem is that the type descriptors are the same (at least the part that identifies the data type). The OpenG Data Tools VI will give you the same result. I suspect it's related to a comment that Jim Kring made regarding the coloring of cluster wires.
Message 8 of 11
(3,895 Views)

Attached is the workaround I used, nothing fancy.  Just posting it incase other people come across this.

 

Regards

Message 9 of 11
(3,865 Views)

Here's a much simpler workaround.  No subVIs are needed.

 

Chris M

Download All
Message 10 of 11
(3,855 Views)