LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP program clarification

Hello everyone.

 

Can somebody explain to me what is going on with the following TCP/IP program?

1 corresponds to the main program. Send1_1, Send1_2 are the subVI (two different conditions).

 

Thanks in advance.

Download All
0 Kudos
Message 1 of 7
(2,062 Views)

Hi MZ,

 

what is going on with the following TCP/IP program?

Why don't you tell us "what is going on"?

Btw. you didn't attach any program (aka VI), all we got are images of the block diagram of some VIs…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(2,049 Views)

Can I send you a picture of my complex Matlab program and ask you to explain why it doesn't work?  You can squint and attempt to type it in, except I only show the "If" clause, not the "else", so you have to guess.  That's what "pictures" instead of LabVIEW VIs do for us.  We can't examine your code, can't test your code, can't even tell what Version of LabVIEW you are using ...

 

Attach Your VIs!

 

Bob Schor

0 Kudos
Message 3 of 7
(2,038 Views)

@MZKhan wrote:

Can somebody explain to me what is going on with the following TCP/IP program?


  • Does it work and you just want to understand how it does it???
  • Is it broken and you want to fix it???
  • Who wrote these VIs? Maybe ask the original author.
  • We need to see all code, not just the surface to help (Pictures are insufficient: Where is the terminal of the "wait" local variable? What is in all the cases that are not shown? What are the names of all the diagram constant without label? What are all the items in the enum? What's inside the VI wired to "get conenction"? etc. etc.)
0 Kudos
Message 4 of 7
(2,008 Views)

@MZKhan wrote:

Hello everyone.

 

Can somebody explain to me what is going on with the following TCP/IP program?

...


 

I have seen stuff like that (and still have the scars so show).

 

If you posted the VIs,, others could add more info.

 

The User event is acting as a "buss" that allows passing message to any other code that is watching the user event.

 

In the top loop a connection is made and received messaes are then pushed out the "buss".

 

Still speculating...

 

The OTHER sub-VI all get a copy of the received message and decide if they care about the message.

 

Do they reply?

 

Not sure from what you showed us.

 

I do not like that type of architecture because...

 

Plus side:

It is easy to pass anything to anything.

 

Negative side:

It is so easy that the same Buss is used for all messages going every which way.

We can chase a messages onto the buss but where the messages shows up and all code that needs the message... You have to chased down into very corner.

 

SO that is what I think that code is doing.

 

Have fun (you better make the best of it if your are stuck with that code)

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 7
(2,004 Views)

First of all, an apology for asking a random question without a VI. I appreciate your replies, Thank you so much. I have now attached the VI. I could not understand the following points in VI:

1. The sender is the VI (Aufgabe) or Send_1 ? Because a notifier is sending data from Aufgabe VI to Send_1 but the write function is in Send_1. And also the listen to function in Send_1.

2. I have used a simple TCP open connection instead of getting connection VI as I don't have it. But what can be the output of getting connection VI? Is it a code or command?

3. Can you kindly describe the overall function of this VI? Actually, I have given just these screenshots to explain the purpose. Hope you will understand.

Thank you for your cooperation.

kind regards

Download All
0 Kudos
Message 6 of 7
(1,979 Views)

It looks like a pass-though code.  The main loop is reading from one TCP connection and sending the read data to the send1.vi via the Notifier.  The send1.vi will read that Notification and send the data through another TCP connection.

 

Do you have any more information on the system this is supposed to be in?  Otherwise, it seems like mostly worthless code to me.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 7
(1,967 Views)