Jump to content

Papang

Members
  • Posts

    26
  • Joined

  • Last visited

Posts posted by Papang

  1. Give this a try.

    Hi ShaunR,

    The programs was work perfectly. But when I press stop button in the client side, the programs was stop running. I put a while loop over the client diagram to make it able to play again after it stop but it doesnt work. (what i'm trying to do is client side able to play and display the image from the server side even its stopped, so it able to play over and over during system running)

    Do you know how?

  2. Hi ShaunR, I have a question regarding these VIs.

    I want to put play and stop button at the client side.

    So when I press play, the camera show the images and when press stop, camera stop receiving the images from the server. And that case may loop over and over again.

    Is it possible to implement?

  3. Hi Lavas,

    I was creates 2 TCP programs, client andserver.

    Client side is open connection and there aretwo functions provided, first are receive the image from the server and second aresend request of Boolean to the server.

    Server side is listen connection and there arealso two functions provided, first are send the image to the client and secondare receive request of Boolean from the client.

    My questions are:

    Can I combine those two functions into one lineTCP connection (because my current programs at two lines TCP connection) and putit into case structure so I can play the connections several time duringprogram running?

    I was try but it no works and some errors comeout so I make it back to standard.

    Hope anyone can help me..

    Thank you.

    Client.vi

    Server.vi

  4. Actually I create these requirements by my own. My lecture not ask me for that but its better if I can implement those functions because my current program is add the user manually by typing into the table. Do you have any basic steps to implement function like I mention before? Forget about my previous program. Maybe I can combine it later.

    I could, but at this point I'm not convinced this isn't an homework ("he/she" is usually indicative of a generic written question) , so I'd like to see that you start to implement these functions. When I tried to answer your question, I couldn't find a simple way to help with your existing program. Any suggestions I would have made would have added more complexity and bug potentials, so I opted to show you a design that you could build on. I hope the design is not too advanced because that would defeat my purpose here.

    Ask yourself, what do I need to implement these two requisites? Are these just two more possible states to be added to my design? How can I add a state in my code?

  5. Thank You François Normandin,

    It was really help me, but I'm still do not know how to create this:

    • When addbutton selected, add user panel will appear and display 2 empty string controlswhich username and password. To add other user, he/she just insertusername/password that they want, press add user button, those data will automaticallyinserted into the table and user admin will back to user panel.
    • When deletebutton selected, delete user panel will appear and display 2 empty stringcontrols which username and password. To delete other user, he/she just insertusername/password that they want, press delete user button, those data will automaticallydeleted from the table and user admin will back to user panel. ButIF username/password is not relevantwith table’s data, message box will appear (telling that username/passwordinserted are not available) and the string control will be empty.

    Can you assist me?

    Hello Papang,

    First, thanks for uploading your code. That helps understand what you want to do.

    I've reviewed it and it is hard to follow when you have many structures within structures. Try to avoid putting multiple event structures in the same loop: you might have deadlocks that are hard to debug. Also, the use of local variables to keep information between loops

    Instead of modifying your code, I thought I'd prepare a Login Demo project for you to look at. It's based on a queued state machine, for which you can find examples in LabVIEW's help or templates. I've put many comments in the code for helping you expand on this example. I hope you find that this demo is useful to decompose all your use cases and create a login VI with the desired functions. Try modifying this base code to achieve the list of specifications you have. If you still have questions, come back... ;-)

    Login demo.zip (LV 2009)

  6. Hi lavas,

    I was creating a user login system using usernameand password, but there something less with the functions. Here belowdescription of the system.

    1. User should using an admin account (username:admin/password:123456)to login at the first time.
    2. When the user was login and stand as adminposition, user panel will appear and display 3 buttons which add, delete and view.
    3. When addbutton selected, add user panel will appear and display 2 empty string controlswhich username and password. To add other user, he/she just insertusername/password that they want, press add user button, those data will automaticallyinserted into the table and user admin will back to user panel.
    4. When deletebutton selected, delete user panel will appear and display 2 empty stringcontrols which username and password. To delete other user, he/she just insertusername/password that they want, press delete user button, those data will automaticallydeleted from the table and user admin will back to user panel. But IF username/password is not relevantwith table’s data, message box will appear (telling that username/passwordinserted are not available) and the string control will be empty.
    5. When viewbutton selected, user list panel will appear and show user table where usernameand password are stored. This table is readable-only. Press done and user adminwill back to user panel.
    6. When it done with editing user account, theuser admin can log out and try to login with other user account. The usernameand password inserted for authentication will be match with the data inside theuser table. Message box will be appearing to notify user IF username andpassword are wrong.
    7. Username/password cannot be empty. IF username/passwordis empty and login button pressed, message box will appear (telling that pleaseinsert your username or password).

    Hopeanyone may solve this. sad.gif

    Thank you.

  7. Sweet.

    Press the green plus "+" on the right of my post.

    As you are using TCPIP to transmit your data.

    You might want to take a look at dispatcher.

    I press the green + until my limit out. ehehe..

    I saw your dispatcher but I'm not really understand on it, I'm still newbie in LabView world.

    But thank you for introduce me something new.

    If I have any question, may I ask you again?

  8. Huwaaaaahhhhh ShaunR,

    It's work perfectly ! laugh.gif

    I was tried to close the Vis, open it again, run it, close it, open it again, run it (ehehehe) several times and no error.

    Thank you so much ! Thank you for assisting me this far, worshippy.gif Ehehehe...

    Is there any appreciation in this forum like NI forum (mark as a solution) ?

  9. Yes you are right. Apart from adding the "Dispose" I also removed the conversion from an image to an array (and visa versa) as I indicated in my previous post. Although I don't think it will solve your problem (but we can hope :) )

    Hi ShaunR,

    The VIs diagrams thatt you post yesterday, it works but the image display is non-current like stammering.But no error at all...

  10. I was able to get the original file zip that you posted yesterday. I able to open it again, run it, it works then I close it, try to open again and the error comes out.

    And then I try to create my own programs based on your VIs diagrams, it works but when I open, the error comes out again.

    But let me try your VIs diagram that you just post, I think there is something different from your previous VIs. I will let you know if any progress.

    By the way, thank you for assisting me here. biggrin.gif

  11. I have do what you ask, but it's still blinking :(

    Here is the block diagrams.

    I can't actually run your code to try things because I'm running windows 7. Maybe someone else might have more luck installing it.

    But. Try something like this.

    Make a copy of the image and transmit the copy.

    post-18102-094355100 1284408251_thumb.pn

    post-18102-052943400 1284408320_thumb.pn

  12. Hi ShaunR,

    Thank's for your advices, but the first is still blinking but not fast as the previous one. Is there any other solution?

    And for the second, if I remove wait ms. The client side not display any image from the server side. So I decide to reduce the amount from 500 to 160 and it works but the display is not smooth really. Is there any other solution or advice what should I do?

    Thank you.

    The IMAQ USB library is ancient.. It was a quick fix before Measurement & Automation explorer supported USB and has many issues such as memory leaks and and the installer has issues with win7.

    I strongly suggest you use the measurement & automation explorer first and use the image libraries to interface to it.

    However.

    To stop the blinking you could try selecting "Synchronous Display" by right-clicking on the image indicator and selecting "Advanced>>Synchronous Display".

    If that fails then you are probably receiving incomplete/corrupted packets or you are timing out, reading nothing and then updating the display..

    The second one is so slow because you have put a 500ms wait in the loop and a receive time-out of 500 ms.Remove the wait ms and use the default time-out (i.e don't wire it)

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.