Jump to content

Thang Nguyen

Members
  • Posts

    295
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Thang Nguyen

  1. Hi,

    I have an issue with control panel which I still cannot find a reasonable way to solve it. I have two number controls which allow user to input value. These controls can only be updated when after inputting the value you click somewhere else or click on "OK" button. The issue is after inputting the value, user will hit enter key, then the last nummeric control will not be updated. If you have experience with this please tell me how to solve this problem.

    Thank you so much,

    Thang Nguyen

  2. Hi,

    I don't sure if Window allows two software programs write to the same TCP/IP port at the same time or not, but currently my system has two programs (1 LabView and 1 C#) having to write data to the same device by a same port. I would like to know which VI I should use to check if that TCP/IP port is busy or not and how I should do to wait on that port.

    Best regards,

    Thang Nguyen

  3. Kirit,

    I don't really sure what you mean when you say you can acquire data from thermocouple. Did you have a device to get the data from the thermocouple yet? You need to use a device to get data from thermocouple such as compact FieldPoint (not too fast <200 samples/sec)or compact DAQ (> 200 samples/sec). Then depending on the device you use, there is specific VI as well as specifi method to read the value in. From that point you just store data like a floating point value. To write data into the file such as Excel file I usually use the .csv file which can open with Excel. To write data into file you can use the "write to spreadsheet file.vi" or "read from spreadsheet file.vi" to read data out. All of the methods to use these VIs can be found in the example finder.

    You can start from here to look for the appropriate device: http://www.ni.com/dataacquisition/.

    Take care.

  4. Hi,

    I am trying to create a steering wheel from a knob but I still not have any luck. I did make the value from 0 to 360 and the value is spreaded around the circle already. But I have problem with the moving part of the control. The only moving part is the needle but looks like I cannot replace it. Do you have any suggestion for this one? This part is really important with the GUI of my project.

    I highly appreciate your helps.

  5. Paul,

    Thank you for your answer. I guess I did something simular which is a class with a private thread created by a dynamic call VI. This VI has a state machine which the state is designed base on the input data. This class is a call by reference and the data communication is implemented by a queue name. What I wonder is the state machine itself will affect to the real time requirement. I just worry about the performance of this pattern. I did use this pattern in a data acquisition system and when the rate requirement is high, the performance of this pattern will be limited.

    Best regards,

    Thang

  6. QUOTE (Paul_at_Lowell @ Nov 3 2008, 02:54 PM)

    Thang,

    In OOP terms I use and like the State Pattern, which works quite well. As far as timing my controller does what it does and just changes state in response to triggers. The controller is ready for a new command at pretty much any time, since the operations it takes directly in response to state changes can execute quite quickly.

    Paul

    Paul,

    Could you please tell me more detail about the State Pattern? Could you provide me any example of it?

    Best regards,

    Thang

  7. Hi,

    Could anyone please give me an example of a OOP template with dynamic process? I created one but I don't think that it is good enough. It has a queue to send data to the dynamic VI which is a private function of the object. This dynamic VI have a state machine and a dequeue VI in the default state to get data which include a command message. Depending on the command message it will drive the state machine to the correspondent state or just waiting at the default state. The issue is the time frame is not fashion in this VI. It based on the command and the data. What I want is the dynamic VI always run at 200ms rate with a certain task and other option tasks.

    Best regards,

    Thang Nguyen

  8. QUOTE (Phil Duncan @ Oct 30 2008, 11:42 PM)

    There is an alternative (quick and dirty) way to achieve this without delving into OOP.

    You could customise a control (boolean, dial etc), set the disabled property to 1 to prevent anything happening when the user clicks on it then simply change the control's position on the screen according to your needs.

    I have included a simple VI to demonstrate what I mean. I used a ring control so that you can even rotate the car to head in the direction it is traveling !!

    This may be too simple for what you need, but it certainly is quick to implement.

    Cheers & Beers

    :thumbup: :beer:

    LOL, it's cool.

    I am using two picture control now.

    Thanks.

  9. QUOTE (jdunham @ Oct 28 2008, 01:21 PM)

    I'm a big fan of notifiers. To me they seem easier than dynamic events, but if you already need the event structure it's probably a good solution. I don't really like to mix the GUI code with the process messaging code.

    The dynamic VI is actually a Map with an image of vehicle which the position is updated continously from the Main VI. The user can interact with this VI also. That is the reason why I need to use the event structure as well as receive the data continously from another VI.

  10. QUOTE (Paul_at_Lowell @ Oct 28 2008, 01:08 PM)

    This is quite similar to what you can do with shared variables. I think what you are doing is fine, but as I've been reading this topic I keep asking myself, "Why not used shared variables?" There are pros (networked communication with logging and alarming built in) and cons (one of which is that one needs the DSC module for full functionality) but I think a mention of this solution belongs here.

    Yeah, I did work with DSC before. But we don't want to buy it. Just use fundamental features of LabVIEW.

  11. QUOTE (neB @ Oct 28 2008, 11:29 AM)

    My first thought would use a queue to pass the data. Since it looks like you understand how to set a control using the "Set control" method, just create a queue and pass the reference to the dynamic VI before you start it.

    Ben

    With the queue I have to wait for the time out to dequeue. In my dynamic VI B, I have an event structure. It maybe affect to each other. It will be the same with notifier. Maybe I don't know how manage them well.

  12. Hi,

    In my project I have one Main VI called A, and a dynamic VI called B. To pass data continously from A to B I use set variant control value node. To generate event from A to B, I send a reference of a boolean and use the register event node connect to event dynamic registration in B and set the value(signal) in A. To generate event from B to A, I also send a reference of a boolean and use the register event node connect to event dynamic registration in A and set the value(signal) in B. Do you think I did right or not? Is there any better way?

    Thanks,

  13. QUOTE (Aristos Queue @ Aug 18 2007, 01:58 AM)

    Hi,

    Is there anyone discovered the format of the string pattern or the array pattern of this picture string?

    I can recover the picture from the string but I failed to recover the picture with a modified string.

    Thanks

  14. QUOTE (Minh Pham @ Oct 27 2008, 06:39 PM)

    I normally use picture control, i quicky wrote an example to show you how to do this. Basically i have 2 picture controls in this example, 1 for the map and

    1 for the object obviously. I loaded them when the program started, so only need to load 'em once. I use state machine with event design partern as the structure of my program. This example shows that you can move the object around the map by calculating the new Origin (x,y) - relative to the front panel,

    and write to the Origin property node of the object.

    It would me much better and easier if you use GOOP to design as you can classify all of your different objs and their properties: for example: object name, color, components, position, size, transparency level, etc...

    If have time i recommend you to have a look at Endevo GOOP tool from Mikael, it's awsome.

    Good luck

    @ Minh: Thank you for your recommendation. What I am talking about is the picture of the vehicle is drawn in the same picture frame with the map. I did talk about that I am using a pixel. But I think it's a good idea to use 2 picture controls. I just wonder if I put the second picture control overlap the 1st picture control and using the transparent color, I don't know if I can still catch the event with the 1st picture control or not. I will try with it. About the OOP, I also had some experience with them. I used GOOP Developer of SciWare and LVOOP . But sometime, in some projects, I think it will be too complicated to use them.

    @Aristos: Currently my project is only 2D. But maybe in the future I have to work with Altitude, so 3D will be used in the next step. Currently it's overkill for my project. Thank you for your suggestion anyway. :thumbup:

    @Philip: It's maybe a worth try. I have never thought about this. Wow. But we cannot do much change with this solution I guess.

  15. Hi,

    I am trying to simulate a vehicle moving on a map. In this project I use picture frame to draw the map and the vehicle. What I want is the position of the vehicle is updated and redrawn continuously without redrawing the whole map. Currently my vehicle is just a point. I would like to know if there is anyway I can erase the old point and draw a new point without redraw a whole picture? For furture extension, is there anyway I can do that with an object like a circle or a rectangle?

    Thanks,

  16. QUOTE (raymyster @ Oct 17 2008, 12:59 PM)

    Hello Community,

    I remember passing on while reading on something like SCADA :( controls, is that an add-on? if so where can i have it, & if it is in labview can anyone point me to it :throwpc: .

    Also if anyone has any cool idea about nice looking controls that will make your front panel look so virtual & cool.

    Your Help is appreciated, Thank You.

    I guess you are talking about the DSC controls, aren't you?

  17. QUOTE (robijn @ May 14 2008, 09:29 AM)

    I also wanted to use the standarized joystick interface instead of expensive hardware to detect joystick and potmeter positions. I ended up with this controller:

    http://www.lbodnar.dsl.pipex.com/joystick/

    which is very nice. You could even use it to acquire voltages between 0 and 5V as really cheap analog input device. But if you do this be warned, the inputs are not protected so this is not advisable.

    This one has 10 bits, sufficiently accurate for me. So far I only needed 4 of the possible 8 axes and about 15 buttons of the 32 possible. The best feature of this type of controller is that you don't need any special drivers to use it (on windows).

    Joris

    Hi,

    I did take a look in the example with the Joystick. Beside the buttons, could you please tell me how we can get the data of the potentionmeter?

    Best regards,

    Thang Nguyen

  18. Hi,

    I have a DSC Modbus server which includes some Shared Variables. I tried to use the event register to catch the event which if one shared variable is changed value. What I did is in the picture. But if one shared variable in one type of register is changed value (for example 10004), all of the remain shared variable in the same type of register generate the event even their values are not changed at all? I don't know how to separate the one which really change the value form the event. I don't want to use the method of comparing the new value with the value stored in shift register based on some reasons.

    Please tell me how to solve this issue.

    Thank you,

    Thang Nguyen

    post-7703-1216251313.jpg?width=400

×
×
  • Create New...

Important Information

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