Jump to content

Thang Nguyen

Members
  • Posts

    295
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Thang Nguyen

  1. Hi, While I am working with 2010, LabVIEW had suddenly closed for 3 times then I decided to uninstall it. I guess next time I will update only after they have SP version.
  2. Thank you for all of your helps. @Minh: I like Dr Slump too By the way anyone can tell me why there is a convert of boolean type when I use build array function? I have seen this but I don't really understand what it is.
  3. I am sorry making you confuse. I mean I want to get the value of the control which has been updated. I can index the cluster but I cannot index the control inside that cluster.
  4. Hi, I have an array of clusters. There are multiple of types of control inside these clusters (number, string, enum, boolean). If I use event structure, I can manage to find out which cluster changes and which control changes but I cannot get the actual value of that cluster. I don't know how to get the reference of the cluster. Could you please give me a hint? This is the part of my code: Best regards, Thang Nguyen
  5. Hi, I am trying to detect the Header Start Byte in a string of data sent though TCP/IP by myself. The string of data is built by concatenate the string converted from array of byte data. When I receive it, I just do in the reverse order. And the match pattern function doesn't work. But if I convert the string to array of byte, I can search it. I post this becaue I want to understand what I did wrong. Thank you, Thang Nguyen I have my code here: TestScanString.vi
  6. Hi, I have just run into a case which I don't quite understand. In my program I created multi thread. Each thread will have each own data queue base on the name of the thread (ex: client 0 queue, client 1 queue, ..). The programs let you be able to remove the last thread and recreate a new thread with the same name for example delete client 1 and recreate client 1. So the program will recreate a thread named client 1 with a data queue named "client 1 queue". When I remove a thread, I always release the data queue of that thread. The issue happens when I recreate the queue, I cannot enqueue, it will have time out, and the queue doesn't work. So I played around with it and finally I tried with flush queue; and it works. Is this a problem with LabVIEW queue? should I flush it before I release a queue or should LabVIEW handle this job? Somehow the memory for the queue is not release if I don't use flush queue. It's just a guess. Hope to receive your idea. Maybe I will not ask this question because long time ago I always flush queue before release it. This is kind of following what I had learned. Then when I posted a question about queue on Lavag, there was someone asked me why I had to do like that, just release the queue. Now this issue comes up . Best regards, Thang Nguyen Hi, I have to add some information, I tried to flush the queue before release the queue, but it doesn't work. It works when I flush the queue after recreating it. Still not understand why. Please give me your idea.
  7. Hi, There is one thing I still not figure out is how I can send data to other clients? I belive that I cannot have the reference of other clients in one client. Inside the process of one client there should be 2 independent loops. One is to receive data, and one is to send data. Could you please tell me how I send data to the rest of client? Best regards, Thang Nguyen.
  8. Thanks Ryan, I decided to change the solution by passing the high ticks and low ticks value seperately. How do you think about my new solution? Best regards, Thang Nguyen
  9. Hi, I am working on a project with cRIO. My VI runs in FPGA. What I do in PC is calculate the frequency then convert it to period and convert to uSec (multiply by 1,000,000). This value is sent to FPGA by the FPGA interface. In FPGA, I just do as in the screenshot. I still have some different in the value. The value I calculate is 60.4 Hz and the signal I received from the scop is 60.2 Hz. I just wonder if I can make it better. This lead to a different of 0.1 mph or 5 r/min depend on signal. I highly appreciate any help. Best regards, Thang Nguyen
  10. Thanks everybody. I quite have something here to try. Best regards, Thang Nguyen
  11. Hi, I tried to compare the value with both the control itself or with the property node value and these always return equal.
  12. Hi, In my VI, I use a Gauge control with a digital display so user can either move the needle or input the value in digital display. In my VI I use an event structure to get the update value. If I use the value changed event, when I move the needle it will generate the event continously. I don't want this happen, I just want the latest value. So I tried to use the mouse up event, then it didn't generate the event if I update the digital display. I have an idea with using a seperate numeric control for digital display and have 2 event seperately. But I think this is a costly solution. Is there any simpler way to solve this? Best regards, Thang Nguyen
  13. Thank Mark, I guess I should do this for all of the channels connect to the server. I just want to confirm that if this is a really good architecture for a server because this is a CAN server workin on a 1Mb rate network with unknow number of real controllers as well as simulator controllers. In my server, I need to read messages from all of the channels connected to the server. Then I need to broadcast these messages to all of the channels beside the one they are come from. Best regards, Thang Nguyen
  14. Hi, I would like to know how to register for the event of receive data from data socket or TCP/IP. I have used normal read only. Currently I am working on a server which require both TCP/IP and socket and some other dll. I think I should use event in this case. Please tell me how to do it. I haven't found any example yet. Best regards, Thang Nguyen
  15. Hi, I would like to know what is the advantage of this reference solution compare with using a data queue + semaphore? It should be similar with command queue in the active pattern of SciWare but it has the semaphore to protect the read and write data. Best regards, Thang Nguyen
  16. Thank you so much, Actually I tried that, but at the same time I assign the first item of the list to the local variable of the control. Then this somehow forces the ring control display <0>. I delete the assign value module and it works. Have a nice weekend
  17. Hi, I have never met this case and don't how to fix it. I have a ring control with a list of item but none of them have value 0. I did initialize the control by assigning a constant value for that control, but it displays [ <0> ] not the item in the list. Then I have to click on the control and select another value it will update to the new one. Could you please tell me why and how to fix it? Best regards, Thang Nguyen
  18. Hi, I am working on writing the frequency pulse signal using digital output with correlated clock in CompactDAQ device. I found some examples about this already, But there is onething I don't understand is before start writing the signal out continuously, I have to define a pattern for my signal by writing an array of data to the DAQmx write. I don't understand about this. How to define the frequency and how to define the duty cycle? Could you please help me? Best regards, Thang Nguyen
  19. I found the solution for the remote access. What I did is copy the server.tcp.acl token to the executable config file. This is the link to the article: http://digital.ni.com/public.nsf/allkb/4CF1F88E4A62A20A862571E90005E3C3?OpenDocument Best regards,
  20. I did go one step further by put the Simulator.exe run on another computer in the network. I call this PC B. And from my computer, PC A, I try to access to the Simulator.exe on PC B. But I get this error: Error 66 occurred at Open Application Reference in Get Control refs in exe.vi Possible reason(s): LabVIEW: The network connection was closed by the peer. If you are using the Open VI Reference function on a remote VI Server connection, verify that the machine is allowed access by selecting Tools>>Options>>VI Server:Machine Access on the server side. ================= On PC A: I changed the localhost string input in the open application vi by the domain name of the PC B. On PC B: What I have done so far is on PC B, I do these settings: VI Server: Configuration + Check TCP/IP + Port: 3364 VI Server: Machine Access + Add my computer domain to the Machine access list. I also add * to this list. VI Server: User Access + Leave blank. I expect this will allow the PC list in the machine access list to be able to access VI Server: Exported VIs + Add the name of the vi: Simulator.vi. I also add * to the list. Do you have any idea if I miss anything? Best regards, Thang Nguyen
  21. Scott, I have just install the evaluation version and I can manage to open your VI now. I work great ^_^. The keyword here is exported VI. Thank you so much, Thang Nguyen
  22. Thank, I am sorry I cannot open your vi because I only have 8.6.1. Could you please save it down to one version for me? Thank you for that. I am trying to work with a simple example. I have a Sim project which includes Simulator.vi which is built become Simulator.exe. I have another Test project which includes Test.vi. I would like from Test.vi be able access to the controls on the front panel of the Simulator.exe. I attach here what I have done so far. Please rebuild the Sim source first. I got an error message with my current Test.vi: Error 7 occurred at Open VI Reference in Test.vi Possible reason(s): LabVIEW: File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS, and / on Linux. Verify that the path is correct using the command prompt or file explorer. ========================= NI-488: Nonexistent GPIB interface. VI Path: C:\My Projects\My New Projects\AutomatedTest\Sim Build\Simulator.exe\Simulator.vi Sim Source.zip Test Source.zip
  23. I mean I want to access the control of one executable from another LabVIEW program which is independent with that executable program.
  24. Hi, I tried search many place but I still cannot find an answer for how to get the reference to a control on front panel of the LabVIEW executable file? This is installation distribution application written by LabVIEW. I am trying to use VI server to access this but the only thing I can find is access to the VI. Is there anyway I can do this? Best regards, Thang Nguyen
×
×
  • Create New...

Important Information

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