LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PROBLEM USING SIT

Hello,

 

I'm using SIT to create an interface between labview and simulink (simulink is the slave).

 

the interface with the mappings seems to work fine, my problem is that once i get the loop of the interface (in green and all the internal loops that by default are generated) I don't know how to use the control or the indicator that i need to exchange dat with simulink.

 

That's to say, if I want to send to simulink a dynamic data every second (a temperature my hardware registers in my case), after doing the mapping, I have problems to wire the control/indicator to the temperature i'm registering to send it to simulink... I've tried to create a local variable and wire it to the signal of the temperature, but in simulink it doesn't update the value and shows (in the scope i place to cjeck the results...) only the initial value i choose for starting...

 

i'VE TRIED FOR INSTANCE TO CREATE A CONTROL AND NOT WIRING IT TO ANYTHING, AND IF I CHANGE ITS VALUE IN THE FRONTAL PANEL, SIMULINK DOES UPDATE THE VALUE... I don't know if i'm explaining properly, but it looks like if i touch in the control of the forntal panbel, simulink works, and if i create a local variable from the indictaor that appears wired in the loops of the SIT circuit, it does nothing...

 

I beg for help, i'm totally frustrated...

 

thank you very much in advance,

 

ALFONSO

0 Kudos
Message 1 of 10
(4,408 Views)
Rather than using a local variable in LabVIEW, try using a property node and select the "Value Signalling" property.
0 Kudos
Message 2 of 10
(4,390 Views)

yeah, I tried it as well... and nothing...

 

one question, is it better (or necessary) to use controls to send the data to simulink? or u can use controls/indicators with no difference? and to receive the data from simulink I need indicators, right?

 

thanks for replying

0 Kudos
Message 3 of 10
(4,374 Views)

Hi,

 

here you are further information

 

1.- Revise this tutorial

http://www.ni.com/swf/demos/us/sit/situi/

2.- Try another version since 2009b version is not supported. You can see compatibilty in the follwing link

http://digital.ni.com/public.nsf/allkb/D174674A91E5536286257428005C2426

3.- Check that ActiveX and TCP/IP options are enabled in Tools>>Options>>VI Server. "

 

Hope this helps!

0 Kudos
Message 4 of 10
(4,316 Views)

Hi  fonsodecelis

 

I'm using Matlab 2009b with LabView 2009 (and SIT 2009).

I've dealing with some of your problems (Using Local variable representation of indicators that does not works nor update).

 

I think the problem is solved:

 

You must locate the local variable representation of the indicator (and his surrounding code) inside the Indicator's While Loop (which is inside the Green "Don't Touch" zone), as the image below shows. In this method the value gets updated.

 

18227i4455A29DD9D272D3

 

I hope this helps, and sorry for my awfull English!

 

Gaspar

0 Kudos
Message 5 of 10
(4,267 Views)

Hello Gaspar,

 

thank you very much for your help, I'll try it tomorrow early in the morning, but I have one preovious question, that is instead of having a graphoch chart indicator, I'm using a numeric one, and i need to operate with the local variable in the block diagram... So if I place the local variable inside the SIT loop then what? How could I use it again in my block diagram to work with it?

 

Your idea sounds new and good to me, but if you understnad my question I'd apreciate if you help me once again... thank you very much again,

 

regards,

 

ALFONSO DE CELIS

0 Kudos
Message 6 of 10
(4,257 Views)

Hi Alfonso!


Im very glad to help you. I''m just a rookie with similar problems than you!


I think you mean that you want to use a Simulink's Signal Value in your LabView Block Diagram, and this signal don't get updated. Am I wrong?


Well, just Right-clic over the numeric indicator, and select Create > Local Variable.

Then place that variable in the same place I previously pointed out.

Now, Right-clic over the variable name, and select Use as Read (or Something similar, right now, I'm at home and don't have LV! Sorry!).

Finally wire the "output" of the Local Variable to something usefull for you. Remember: Always inside the While Loop.


I think this approach works Ok for small "Custom Diagrams", but for more sophisticated works you could create a Sub-VI in the mentioned area to work with more space. I think linking the Locals Variables there wont be dificult.

Please, remember telling us yours results!

Seems that are many people dealing with this!


Best regards


Gaspar

0 Kudos
Message 7 of 10
(4,246 Views)

Hello again,

 

do You mean that I must place inside the green while loop the numeric indicator, create there the local variable and change it into read? But I need to use the value I get from Simulink inside my big "normal" loop... can I wire from the green loop till the other inside?

 

Moreover, I forgot to say, that the main problem I think is that I'm working in real time in Matlab. That means, I don't want the values from simulink every simulation, I order it to execute in external mode at the sample time i ask it for, but in this mode i just can send values to simulink but not getting them back into LV...  BUt if I work in normla mode, I get them back but not every second that it's when i need them... it's a bit frustrating...

 

Do you know what am I talking about??

 

thanks a lot again,

 

regards

 

ALFONSO

0 Kudos
Message 8 of 10
(4,229 Views)

Alfonso:

 

When you use the SIT Connection Manager, and maps some indicator (numerical or graphical) to some SL Signal, the SIT Connection Manager automatically place the indicator inside a nested FOR loop. In my approach, I make a Local Variable from this automatically placed indicator and then I move it (the Local Variable)  to the Grey While Loop that resides inside the Green Case Structure. To get the values from this Local Variable, I convert it to Read, and then I got readings of the signal value to do something else.

I suppose you already have a "Big Custom While Loop" that is outside the zone I pointed out. Well... I don't have already figured out how interconnect these two entities. I'm doing "everything" in the space cited before.

I think this is the normal approach since when you use SIT, Play-Pause-Stop-Exit controls are attached to the Front Panel, telling some how, that the Block Diagram is "mastered" by the SIT structure now.

I hope exist some way to simply "GET" (or READ) and "PUT" (or WRITE) signals from and to the SL Model via LV... Something like "Local Variables" that we can wire in any place of the Block Diagram. For now, I dont find something similar. Maybe we are looking at the wrong places!

 

Gaspar

0 Kudos
Message 9 of 10
(4,216 Views)

Alfonoso,

 

If you are still trying to solve your issue, I found this message in the Board:

 

http://forums.ni.com/t5/LabVIEW/SIT-Connection-Manager-vs-SIT-Blocks/m-p/951830#M426818

 

There, someone suggest using a parallel While-Loop with Signalling of the desired Control/Indicator to use it as Variable.

 

Cheers.

 

Gaspar

0 Kudos
Message 10 of 10
(4,157 Views)