LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

To more specific class for waveform chart

Dear All

 

In the attached VI diagram the "To more specific class" gives an error messag:

 

LabVIEW:  Type mismatch: Object cannot be type casted to the specified type.

 

so it can not work for my waveform chart. I think I changed some properties or some thing similar for my chart that can not work with this routine because it works for new instances of waveform charts but whatever I try to find the difference between my waveform chart and a new instance of waveform chart I don't not find any difference.

 Do you have any clue?

 

Best regards

Afshin

 

 

0 Kudos
Message 1 of 8
(3,651 Views)

Hi there

 

i don't think it is possible to cast a reference of a non - strict typedef ctl to a strict typedef ctl type.

 

Are you sure the ctl references are pointing to instances of the strict typedef? If not just use a "Waveform Chart" type.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 2 of 8
(3,647 Views)

Dear Chris

 

When I make a reference to my chart ("creat reference") and create a constant for that reference it gives "strict waveform chart" so I think it is a strict type and it works for new instances of chart when I add them on the panel.

 

Regards

Afshin

0 Kudos
Message 3 of 8
(3,642 Views)

chrisger wrote:

Hi there

 

i don't think it is possible to cast a reference of a non - strict typedef ctl to a strict typedef ctl type.

 

Are you sure the ctl references are pointing to instances of the strict typedef? If not just use a "Waveform Chart" type.


 

You can but it has to be the right type since things like the History node has to adapt if the chart is using DBLs Waveform data type etc.

 

In this example

 

 

1) Rihgt-click and make the strict ref constant into a control

2) ctrl-drag the waveform chart (the actuall chart used on the FP) into the control you created in step #1. The control will adapt the right type.

3) make the control a constant again.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 8
(3,638 Views)
Try to use the "Controls[]" and the "ClassName" property instead. See attachment.
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 5 of 8
(3,636 Views)

 

Hmm, he stated that he created the class specifier constant by right clicking an instance of the original strict typedef, so the constant should match.

 

Am i missing something?

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 6 of 8
(3,633 Views)

chrisger wrote:

 

Hmm, he stated that he created the class specifier constant by right clicking an instance of the original strict typedef, so the constant should match.

 

Am i missing something?

 


I suspect "... I think I changed some properties or some thing similar for my chart ..." from the original post.

 

 BTW Class names are subject to change by NI without notice. The class ID (?) is concidered safer but not totally safe.

 

Ben

Message Edited by Ben on 01-23-2009 11:18 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 8
(3,630 Views)

Dear Ben

 

I think I don't get the second step. I pressed the "Cntrl"  button and drag my chart icon on the Ref made in first step but nothing happens.

I tried it with both char icon and its reference but it didn't make any difference.

 

Best regards

Afshin

0 Kudos
Message 8 of 8
(3,594 Views)