LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending an output in LabVIEW to Simulink as an input

Hi guys,

 

I'm at the exact same point as Tebu.

 

I've created a control, I've created a control property node, I've selected value, I've used a numeric constant as an input to the value property node, I've created a Simulink model consisting of a constant and display block, I've run SIT and mapped the control to the constant's value, and the control changes from it's constant's value to the Simulink model's control's value. That is to say:

 

The constant's original value is 0

The display block displays 0

The numeric constant's value is 1

The numeric control displays 1

 

When executing the VI the control's value changes to the Simulink model's constant's value, i.e. the numeric control equals 0 rather than 1

 

It's somewhat perplexing. I've attached

 

Any insight would be appreciated.

 

Regards, 

 

Frazer

 

 

Download All
0 Kudos
Message 11 of 37
(1,986 Views)

Hi Frazer,

 

I'm a little bit confused about the problem description. You seem to use the term constant to refer to two different entities. Could clarify for me a little what the problem is? Giving your constants names would probably help.

 

Thanks!

Tanya Visser
National Instruments
LabVIEW Group Manager
0 Kudos
Message 12 of 37
(1,964 Views)

Hi Tanya,

 

Sorry for not being too clear.

 

Assume Simulink's constant block is called 'A', the LabView numeric constant is called 'B', and the LabView numeric control is called 'C'.

 

C is mapped to A via SIT, i.e. C's value is the input to the Simulink model's A constant.

 

Using C's property node, constant B sets C's value; however, when the VI is run, C doesn't become B it becomes A.

 

My previous post had the VI and an image of the Simulink diagram I was working with attached if that would help clear things up as well.

 

 

Regards,

 

Frazer

0 Kudos
Message 13 of 37
(1,943 Views)

Hi Frazer,

 

You might be running into a type race condition with your program.You could be reading the value of the control before the property node sets the value, because you are not controlling the order of execution of your program.

 

Is there a reason you are using the value property node instead of setting the default value for the control?

 

Otherwise, I would recommend forcing the property node to execute before your SIT code by using error wires.

Tanya Visser
National Instruments
LabVIEW Group Manager
0 Kudos
Message 14 of 37
(1,928 Views)

Thanks Tanya,

 

I'll have a go at controlling the program's order of execution to see if that fixes it.

 

Frazer

0 Kudos
Message 15 of 37
(1,921 Views)

I've solved the issue.

 

Rather than use the LabView numeric control's Value property, use the Value(Signaling) property.

 

So, given a controller, you can change the numeric control's value on the fly and use it as input to Simulink, i.e. use LabView outputs as inputs to Simulink.

 

Frazer

 

 

Message 16 of 37
(1,898 Views)

Hi is there anyway I can take output of simulik "signals processing block" into labview for further use in labview, please assist me.

 

Thanks

A.Adeel

0 Kudos
Message 17 of 37
(1,851 Views)

Adeel1,

   I would recommend starting your own thread on this as it sounds different from the title of the post. In terms of what tools to use the Simulation Interface Toolkit sounds like the one you need.

 

Regards from Austin,

Ben J.
National Instruments
Applications Engineer
0 Kudos
Message 18 of 37
(1,842 Views)

Hi Ben

 

thanks, there is one query in discrete wavelet transforms, let suppose if the we input 4QAM modulated signal let say(0.707+0.707j) into inverse discrete wavelet transform and then use discrete wavelet transform to get back the symbol, but we only get the real part after that i.e. 0.707 not the imaginary part, how can it be resolved. one more thing is, Actually I want to upsample the array means I want to pad zeroes in between the array symbols, how it could be done as well, Please assist me !! I'll be grateful. Thanks

 

Regards

Ahsan Adeel

 

 

0 Kudos
Message 19 of 37
(1,795 Views)

Hi Ahsan,

 

For the array to be padded with zero's you could initialize an array, insert zero's and then insert your data into the same array at a later time in the code.

 

Is this what you would like to have done, or do you want zero's in between each set of data?

Ricky

National Instruments
Applications Engineer
0 Kudos
Message 20 of 37
(1,782 Views)