LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview security system with tcp/ip protocol

please somebody help me out. I am currently a student and beginner to this entire labview thing...i was given assignment on labview cld security system topic but with a twist of using client server concept by implementing tcp/ip protocol...
I have no idea on even how to begin...can please someone help me...please am very desperate...please help me out

0 Kudos
Message 1 of 10
(2,485 Views)

I would start by learning how to do TCP/IP communications.  Look in the Example Finder (Help->Find Examples) for Simple TCP.lvproj.  It contains a client and a server VI that you can learn from.

 

After that, figure out what each side of the communication should be doing and code that up.


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 2 of 10
(2,467 Views)

Go read about state machines.  This will be the best architecture for the problem.  But before you do any coding, plan this out on paper using a flow diagram.  Start the program in an idle state.  At each node, write down what needs to happen at that node (send data to server, change indicator, wait for button press, etc).  Continue making nodes to cover every aspect of the system.  At the end, every branch of the diagram, after it has completed the associated task, should take you back to the idle state where the process starts over.  Once you have the decision tree laid out, coding the system should be much easier. 

 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 3 of 10
(2,460 Views)

@RospraHinivith0926 wrote:

please somebody help me out. I am currently a student and beginner to this entire labview thing...i was given assignment on labview cld security system topic but with a twist of using client server concept by implementing tcp/ip protocol...
I have no idea on even how to begin...can please someone help me...please am very desperate...please help me out


 

How to begin?? I assume you haven't even tried the basic "security system", so start with that. If you are not done in 4 hours, you are not ready and I recommend going back to the tutorials. If you made the code scalable and expandable, adding TCP/IP functionality should be an absolutely trivial thing that you can do at the very end. UDP is probably sufficient.

Are client and server running on the same machine or across networks. Who is server and who is client and what are their respective responsibilities?

0 Kudos
Message 4 of 10
(2,430 Views)

hello there... now that i learned about the protocol, the thing that i could not able to figure out is the conditions which override an input without turning the initial output off. 

0 Kudos
Message 5 of 10
(2,393 Views)

hello, thank you for giving me some jumpstart.. will take into consideration and try every advice given..

0 Kudos
Message 6 of 10
(2,392 Views)

hello, yes you are right i didnt try but thats because i am very new to labview, what i learned in school is basics, but the assignment given is very complicated for newbie like me. that is why i didnt do anything because i dont know how to.  to answer your question, yes the client and server runs in the same machine. the client side is all the switches and the server side is the zone indicators (LEDs). the server side should light up the LED according to the switches turned on from the client side.

0 Kudos
Message 7 of 10
(2,388 Views)

@RospraHinivith0926 wrote:

hello there... now that i learned about the protocol, the thing that i could not able to figure out is the conditions which override an input without turning the initial output off. 


Seems like you probably need to latch your inputs via Feedback Node or similar, and have cascading Select nodes or similar to determine the state of each output. (But I didn't try this to check how I'd do it, so if you can't make it work, that might not be true...)

 

Note that you'll still have to think about how to implement this in terms of multiple zones, since the instructions tell you to make this easy to add or remove zones without rewriting hierarchy. It's not obvious to me which hierarchy this refers to... perhaps VI Hierarchy?

 

As a side note, it's easier to understand your responses if you either address specific authors, or quote their messages like I did above.


GCentral
0 Kudos
Message 8 of 10
(2,368 Views)

@RospraHinivith0926 wrote:

hello, yes you are right i didnt try but thats because i am very new to labview, what i learned in school is basics, but the assignment given is very complicated for newbie like me. 


You are definitely not qualified to solve a CLD style problem, so go to you teacher and tell him that.

 

From the NI documentation:

"A CLD demonstrates experience in developing, debugging, and deploying and
maintaining medium-to-large scale LabVIEW applications. A CLD is a professional with
cumulative experience of approximately 12 to 18 months developing medium to large
applications in LabVIEW."

 

Obviously, you don't have that experience. It is completely wrong and useless to throw students into the deep end with an assignment like that. You cannot learn anything this way.

 

Now maybe this is much simpler than a CLD security system. If all you need to do is change switches on one computer and turn on LEDs on another computer, you should be OK. There are quite a few very simple ways to do that. (For example network shared variables use TCP/IP.)

0 Kudos
Message 9 of 10
(2,341 Views)

All you need is a client with multiple boolean arrays and a server with an array of colorboxes (see here). The client needs code to turn three booleans into a color, this can easily be achieved with a lookup table. No need for any boolean logic. Iterate over the three arrays and inside the loop turn each set of three booleans into an array and then use "boolean array to number" to index into an array of 8 colorboxes where each element is colored according to the state (you'll have some duplicate colors, of course).

 

First get the boolean to color working locally, then turn it into a subVI. Then add the network stuff. You should be done in 10 minutes. 😉

0 Kudos
Message 10 of 10
(2,322 Views)