05-03-2019 06:21 AM
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.
05-03-2019 06:35 AM
05-03-2019 07:36 AM
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
05-03-2019 02:37 PM
@MZKhan wrote:
Can somebody explain to me what is going on with the following TCP/IP program?
05-03-2019 02:57 PM - edited 05-03-2019 03:00 PM
@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
05-05-2019 06:36 AM
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
05-05-2019 09:52 AM
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.