Jump to content

marius

Members
  • Content Count

    12
  • Joined

  • Last visited

    Never

Community Reputation

0

About marius

  • Rank
    Active
  1. Hello Khalid and thank you very much for your comments and info. Very appreciated. Marius
  2. Khalid, I thank you for your pertinent remarks and for your time spent for me. I really appreciate it. Even before, starting with LabVIEW I've felt that something is wrong with my approach and mostly that I need to change the way of thinking in this environment. I am an old dog, frozen in text code and dos approach where I worked for years. I don't have enough Windows programming experience. I will try to upgrade my thinking. Can you recommend a good manual for this issue? Thanks, Marius
  3. Download File:post-5076-1165432636.viDownload File:post-5076-1165432666.viDownload File:post-5076-1165432678.viHello all, Finally I got it. Take a look to load-save-array-01.vi: Allows you to specify a path, change values in array, then save the array. Also you can load the array configuration from the file. If you look at its diagram, you wont see any subVI
  4. Hello Omar, Aristos, hello all, Your comments are helpful to me and I think that now I understand more. Probably you need to know that most of my experience is in text code (C, QB), under dos and VB under windows. Now, I need to complete this project in LabVIEW and I have fully read the user manual, but I find it not very hepful. I will attach here the following files, making a very simple example that doesn't work and I don't know why. - save-03A.vi - sub-save-02.vi The first vi calls the second one, as a sub. What save-03A.vi supposes to do (but it doesn't) is to allow to the user to fill an array of two clusters, to specify a path and when it presses on "save", the sub has to save the array. Unfortunatelly it doesn't save and the program stops after one iteration, with no error shown. Can you please explain me where I should repair and why doesn't work? I am very obset with it, since in other languages would take minutes to accomplish such a simple job, but I have to use this LabVIEW which I like it for its capability to build GUIs. A quick and clear answer will be highly appreciated. Thank you very much, Marius Download File:post-5076-1165343915.vi Download File:post-5076-1165343938.vi
  5. Hello Khalid, all, Thank you for your quick answer. How I understand the situation until now is: - if you have a sub and you want to pass a parameter to it, you assign a CONTROL of this sub to a collector of the sub and that collector becomes an INPUT. Later on you can connect a CONTROL from the main program to it. - if you want to get a parameter from the sub, you assign an INDICATOR of this sub to a collector of the sub and that collector becomes an OUTPUT. Later on you can connect an INDICATOR from the main program to it. Now, my problem is little different: I want to pass the pointer (address) of my array to the sub, so that, WHITIN the sub, I will be able to: 1. save the array on the file. In this case I use the pointer above as an INPUT. No array modification. Just get it from the main and save it. 2. Load new values into array, from a file. In this case I use the pointer above as an OUTPUT. Questions: How to correct my sub attached in my first "e-mail" here, so that it responds to the above 1,2 ? How to address the sub from the main, once the sub corrected? A quick answer will be greatly appreciated, Thank you very much, Marius
  6. Hello Khalid, hello all, save-02A.vi has two tasks: Saves the array under the default name (see the path - here if you want to make it run, you need to write another path, valid in your computer) and Loads the array by calling the same default path. save-02A.vi calls the subprogram sub-save-02.vi. The problems here are: 1.this subprogram, when called, doesn't work. 2. When you try to use it for saving the logic is ok, you send the array in the subprogram. But when you want to load the array, you need to have the array back from the sub, as a returned value, and I don't know how to do it. In other words, I need to send the pointer (the address of the array) in the subprogram, so I can use the array there for saving, or for modifying it (in case when I load it from the file), so I got it modified back in the main program. To note that I already tried the same code, by incorporating all into a main program, no subprogram, and it works fine. So the problem is with the passing the parameters to and from the subprogram. Can you or somebody else help? I badly need to know how to do this, because I need to use it in other applications right away. Can you or anybody else help me? Thank you very much, Marius
  7. Hello, I have the following problem in my project: Because of the size of my code and not only, I have to use subs. The attached file save-02A.vi uses the sub sub-save-02.vi. This sub has three inputs: two booleans, LOAD and SAVE and an array of clusters. My problem is with the array of clusters: When I send it in sub to save it is logically ok (however save-02A doesn't work and I don't know where is the error), but when I do a load in sub, how can I get the new array content from the sub? In other words, how can I send the pointer of this array in sub, so that I can use the same memory space for save and for load? How can I pass not a copy of the array in sub, but its address? I know how to do it in other languages, it is easy, but in Labview documentation I did not find this explanation. Thank you very much. Marius Download File:post-5076-1165199023.vi Download File:post-5076-1165199044.vi
  8. thanks again for the help, it is very appreciated. now, in the attached, i created a routine (has a sub, that is why there are two files) which creates a second file when a first is created. my big trouble is that i cannot read properly these two files. i want to do it in the same way i write them, and i got an error while reading. i don't know how to deal with this error, i have tried and i have tried. need a little help, please. thanks, marius Download File:post-5076-1151981102.vi Download File:post-5076-1151981131.vi
  9. Download File:post-5076-1151934065.vi Thank you for answering so quickly. Because I am not an advanced LabView programmer, I tried this code, attached, very simple and I still have err 1 when I run it. I don't understand. Can somebody help me? thank you very much, Marius
  10. Download File:post-5076-1151864452.viHello, I need to save/write two files with only one file dialog and I cannot do it. The exercice is to give a file name, save it as *.PRD file, then right after save another file *.PRS with the same name. The same thing for load. Another thing that I don't know: How to save a file without a dialog, when the file name is pre-defined. Need a little help, because I am jamed and I need to go on. See the attached file in LabVIEW 7.1. (don't have 8). Thank you very much, Marius
  11. Download File:post-5076-1148182891.vi I just got back to this forum because it happened to find a solution. Probably is not the only one. I've found your recommendation and I thank you very much. I am planning to pay attention to this aspect in the future. I attach this solution it here. I have tested with several save and load and it seems reliable. Do you find it reliable and robust? any weakness? The attached file is just a trial for a bigger subprogram that I need to write with an array of 10 rows, each row being a similar cluster of 23 various variables with variable content from row to row. Any comment will be very appreciated. thanks, Marius
  12. Download File:post-5076-1148162188.vi Hello, I have created this VI in LabVIEW 7.1 and I cannot read the array written on file. can anyone help me please? thanks, Marius
×
×
  • Create New...

Important Information

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