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 and need the recommendations form you.

    Currently, I am working on an old project which my company did it with LV 7.0. This is a big project and take a lot of time to develop. This is the reason why we try to find a way to move the program from 7.0 to 8.5 without rewrite the whole thing. The problem is this project use DSC and there are a lot of tags.

    My question is there is anyway to move the program from LV 7.0 to LV 8.5 by converting the tag engine from 7.5 to 8.5. This relates to another issue as the DSC VI used to read and write data.

    I hope that by your experience you can give me some suggestions.

    I highly appreciate your time of reading and answering my question.

    Warm Regards,

    Thang Nguyen

  2. QUOTE(ned @ Sep 18 2007, 02:19 PM)

    If you're asking how to change the address of the register using the Modbus I/O Server, you need to type in the number yourself after you select the address range, in the shared variable properties. This wasn't obvious to me at first but you've probably already figured it out. I also found that the IO Server allows one digit more of the address than the Modbus master I used, and to fix this I removed the second digit (starting from the left - highest order) from the address. That is, I assigned 4000001 to a shared variable, and I set the master to read from 400001.

    Could you tell me more detail about this? I am not clear about why there is the different between the address of the shared variable in modbus slave 4000001 and shared variable in master 400001.

    What I have tried to do is in the target I create the Modbus Slave Server and 1 variable bind to it. In the host PC, I create the Modbus Master Server and 1 variable bind to it. All of the variable have the same address. I cannot read anything form the variable on the Modbus master.

    Thanks,

    Thang Nguyen

  3. QUOTE(ned @ Sep 17 2007, 04:33 PM)

    I feel fairly confident in saying that your NI engineer is mistaken, since I've done exactly this using an FP-2010. I suspect that the NI engineer thought you were asking about direct Modbus access to the modules (or using OPC) which I believe is possible with the 18xx. It is worth using the Modbus I/O server on the Fieldpoint module as it is much easier to use than the Modbus library.

    You asked about a similar situation in another thread; did you ever resolve whether your shared variables were working properly, independent of the Modbus binding?

    I did solve the problem about the shared variables which bind to the modbus. Form the PC, I can read the data through the shared variables already. But when I tried to use a Modbus Simulator to simulate the Modbus Master, I cannot read anything form the same adderss. Because in this project, I use the PI Server to read from the modbus. It's not a VI run on the host machine. I don't know what is the real problem with it, I tried some simulators already. Could you give me some recommendations?

    Thank you,

    Thang Nguyen

  4. Hi,

    I am currently working on a project which require to implement the Modbus Slave in the cFP 2120.

    +The first thing I know is I cannot use the shared variable bind to modbus because this device does not support modbus (only cFP 18xx). This is confirmed by application engineer of NI.

    +By searching some forum, I know that we can use the Modbus library inside the FP device. But I am not clear how to lunch the Slave demon VI. Actually I don't know how to use this library in the FP device. Should I add the library as a folder and then use the VIs in this library?

    I tried to add the MB Ethernet Example Slave into the target, and run the MB Ethernet Example Master on the host PC, but it didn't work. Then I tried to build the RT executable file and deploy it into the FP, and it didn't work either.

    +By the way, could you tell me how can I change the address of the register in the modbus I want to use ?

    I highly appreciate your helps,

    Best regards,

    Thang Nguyen

  5. QUOTE(Ben @ Sep 12 2007, 09:40 AM)

    I reacted the same way when I saw someone wire an enum to a format into string.

    @Ben: Could you tell me what is the format into string VI? :) I don't know about this :P . I have to you the property strings[] and array indicator to get the string of an enum.

    @All: You guys are experts in LabVIEW, so if you have time, it's really helpful if you can list down these tricks in VI. I really want to learn more about these stuffs. It's hot :thumbup: .

    Thang Nguyen

  6. I tried to create a test project to test the modbus but it doesn't work. Could you help me?

    In the target, I create a library. After that I create a Modbus Slave I/O Server. Then I create a shared variable bind to this modbus. In Target VI, I write the value to this shared variable. In the host VI, I read data from this VI. The issue is I only get value "1" from this shared variable with watever this shared variable is updated in the target.

    I attach here all of the necessary images.

  7. QUOTE(ned @ Sep 10 2007, 01:40 PM)

    It would be easy to combine all the modules into one modbus server because FieldPoint IO items are treated identically regardless of whether they are local (directly connected to the network module) or remote. You could put all your shared variables, bound to a Modbus I/O server, on one of your Fieldpoint modules, and let that module retrieve data from all your other modules over your ethernet network. You'll only need code on one module, and all the other other modules can have "dumb" network interfaces (the cFP-1804/1808).

    Thanks for your recommendation.

  8. Hi,

    I start working on a project which requires connecting many cFP devices. The requirement is I have to put all of acqusition data in the modbus protocol, so the database of client can access to these data.

    I have just thought about make each cFP work independentl with modbus server inside and run with deployed real-time program. Each cFP will have a range of data address shared variable. But I don't know that if all of these modbus servers can be combined to become one?

    I woulk like to ask for your recommendations. This program does not need to be real time. Above is just one idea of mine. I am still thinking right now.

    Highly appreciate your helps.

    Best regards,

    Thang Nguyen

  9. Hi,

    I have just finished one project in which I implement some class with LabVIEW OOP in the LV 8.2i. When I build the executable file, I meet this error

    =============================================

    An error occurred while building the following file:

    D:\My Application\Classes\DAQ Control\Private\Internals\GetData.vi

    The VI became broken during the build process. Open the Build Specification and enable debugging to include the front panel and block diagrams.

    =============================================

    I tried to enable the debug, but I meet this warning:

    =============================================

    A name collision occurred during the build. VIs were renamed to protect the build. If any dynamic calls were made to the following VI(s), unexpected behavior may occur.

    =============================================

    Because in each class I have similar VIs, for example GetData.vi, is it the reason of the warning? Then when the building process come to the last stage, which means I see the message build completed, the LabVIEW start to crash.

    If someone have any idea, please help me.

    Highly appreciate your help.

    Thang Nguyen

  10. Thank you so much,

    I have just found myself a really simple way. I just only need to select the property for the path control which browses for the directory only. Anyway, I studied a lot of new techiniques here.

    Thank you again,

    Thang Nguyen

  11. Hello,

    Could anybody tell me is there any way to browse for a directory only? I want to let user select the directory, and write the name of the file seperately. The current Path Control is used only to browse for a file. Behind are two examples I want:

  12. Rolf,

    I now find out exactly the problem is because of the driver, or UDP protocal. I test the program with only 2 VIs UDP Initialize and UDP Close. I run it for 10 times, then the error happens for 4 to 5 times. I try to modify a little bit with add a delay part into it which very from 0.5 sec to 5 sec. The problem still happens.

    And the issue happens at the UDP Read -> UDP Read Response -> UDP Get Devices -> UDP Initialize.

  13. I still don't know how to solve this problem.

    In VI, at the first time, I meet the error 54, then after reinitializing, it works fine. But if I run in highlight execution mode, I didn't meet this error.

    In executable file, at the first time, I meet the error 60, then after re_initializing, I meet the error 6003.

    I tried to run with your driver, but it still the same.

    Then, I tried to increase timeout, event, to 1sec.

    I also add the line: SocketSetReuseAddr=TRUE into the labview.ini file.

    But it still does not work.

    Is there anyone have the same problem with me?

    Waiting for your recommendations.

    Thank you for your time,

    Thang Nguyen

  14. QUOTE(yen @ Jun 23 2007, 03:38 PM)

    Seems fine to me. The chart starts with the current time, but since it's empty (you give it an empty history as well) it shows 10 years forward (I guess that's the default). When you add data, this should change.

    As I mentioned, I prefer graphs, which also allow you to have different gaps between the points.

    I tried to make some changes, but it's still not work. One of the reason lead to this issue, in my thinking, is I use the reference, not connect directly to the plot indicator. Because I use a seperate thread for displaying, so I cannot plot directly on the wavefrom in the main panel. I create an waveform indicator for the thread and it works well. I attach the pictures here.

    If I let the program run continously, the plot on the main GUI still displays from 2007 to 2110 then more.

    I use the chart, so the waveform can be updated easily by the parallel thread.

  15. QUOTE(rolfk @ Jun 22 2007, 01:15 PM)

    .

    Welcome to this library from yours truly. Why you would have to call the Open twice I'm not exactly shure. It isn't necessary for me and most probably is the cause for your runtime error since error 60 means that there is already a connection open to that specific address/port pair.

    Also I recently found a bug in this library that prevented it to work with PLC Direct systems equiped with the ECOM100 interface. Attached version (LabVIEW 7.1) fixes that so that it also works with that module.

    Also your attachment wouldn't help anyone not having the library much as it is missing utility functions located dnetudpu.llb.

    Rolf Kalbermatter

    Rolfk,

    Thank you so much,

    The reason I have to call the open twice because at the first time it cannot open the connection. In my program, I allow user retrive the connection with the device if it cannot open the connection automatically. If the connection does not open, there will be a dialog allow user to call this VI again, then it works. The only problem is it cannot work in the executable file. That make me confuse.

    Base on your solution, I will try to close the connection before open it.

    Could you tell me where did you fix in the library or can you remake it in the LabVIEW 8.2? I use LV 8.2.1.

    Thang Nguyen

  16. Hi,

    My project requires to connect with a Direct Logic PLC base on the UDP protocal. I have the driver for the PLC.

    The communication is started by initialize the UDP communication and generate a connection ID. If I need to read something form the PCL by using the driver VIs, I need to connect this VI with this connection ID. The program works fine before building executable file. I have normal connection, although I have to initialize the connection with the PLC two times. I think the problem because of the UDP protocal. Then when program runs, I can get all of the data I need.

    The issuse is after I build the executable file. I cannot initialize the connection anymore. I attach here the error message.

    I don't understand why there is a different between program run based on executable file and based on compile form the code. Is it the problem with the driver library? I use this VI by open the functions palette, then click select a VI, then browse to the VI in the llb.

    Please help me on this issue. Highly appreciate your time.

    Thank you so much,

    Thang Nguyen

  17. QUOTE(yen @ Jun 22 2007, 06:25 AM)

    The properties you want are XScale.Offset and Xscale.Multiplier. Offset is the time when your data starts (as a DBL) and Multiplier is the number of seconds between each two points on your chart.

    Once the chart knows when the data begins, it can display the correct time.

    A better option might be to use a graph instead of a chart.

    I try to do what you say, but it still not work.

  18. QUOTE(Sherif @ Jun 13 2007, 03:58 PM)

    OK Thang Nguyen Listen on LABVIEW front panel on the waveform chart you want to specify it's XAxis do the following:

    -------------------------------------------------------------------------------------------------------------

    1- right click on the waveform.

    2- choose PROPERTIES.

    3- on the window go to SCALE menu.

    4- remove autoscale choise box and then specify the Minimum and the maximum.

    5- Press OK.

    That's all hope it work as you need isa.

    Hi,

    XAxis is the timestamp, so what should I specify for time?

    I try to put some random number there, then in the program I use property node to set the max and min range to current day/time, but what I get now is from 1997 to 2007??????

    I took me quite a lot of time. I cannot understand why this happens.

    Thank you for your time,

    Thang Nguyen

  19. Herbert,

    Thank you so much for your meanful information.

    I want to confirm this information:

    Is it always true that storing the Y value of waveform and seperate it with the timestamp is more efficient than storing the waveform?

    Based on the property of TDMS channel (wf_increment, wf_start_time), I think TDMS naturally used to store waveform.

    But in this case, it is easier for me to read data out, if I seperate the data and timestamp.

    Love to hear about this:

    QUOTE

    Unrelated) I see from the flags on your account that you're from Vietnam. I just came back from 2 weeks of vacation, visiting friends in Vietnam. They took me on a roundtrip through the country, including Hanoi, Ha Long, Nha Trang and Saigon. Best vacation I had in a long time. I'm addicted to Caffee Suo Da now :thumbup:

    I have never come to Caffee Suoi Da, actually, there are a lot of coffee in Vietnam ( a lot ...). I lived in Saigon. :). Do you feel hot there?

    Thank you again,

    Thang Nguyen

  20. QUOTE(Herbert @ Jun 18 2007, 01:58 PM)

    Looking at the file with the TDMS Viewer, what you have is:
    • different channel lengths (high freq channels have 618 values, low freq channels have 224)
    • same dT (1.00 for all channels)
    • varying starting times (T0) for every channel

    It looks like you are using waveforms to save single values. In that case, I'm not sure that DAQmx or other functions that put out waveforms will set dT correctly, because there is no second value to reference to. If you save a series of single values to a waveform channel, you need to be really sure that they are equally sampled. If you're not sure, you should rather split up the waveform data type and store the timestamps and the data values to different channels (e.g. one timestamp and one double channel).

    Saving single values to TDMS like this is also not a very efficient thing to do. It is a lot more efficient to gather a bunch of values and write them as a larger array. You can have the TDMS API do that for you by setting the channel property "NI_MinimumBufferSize" to the number of values that you wish to buffer. In your case, good values might be 1000 or 10000.

    Hope that helps,

    Herbert

    In my program I put store VI into the loop. It scans through the array name of channel, then, read and store the correspondent data into the file in that sequence. That why those channel don't have the same start time. But the diffference is just some msec.

    I have two questions for you:

    A) Is the wf_increment depends on the dt? If that is the case, I understand why the data are stored with the same wf_increment.

    B) Do you mean that I should gather all of the Y value of each channel into an array, then put everything into the TDMS file? Could you tell me more detail how to store everything at once into the TDMS file?

    Thank you,

    Thang Nguyen

×
×
  • Create New...

Important Information

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