Jump to content

fillalph

Members
  • Posts

    13
  • Joined

  • Last visited

    Never

fillalph's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Aristos Queue: I configured them this way. I thought I read a table that showed the conversion between LabVIEW and C, but I had it wrong. Thank you for your help. Cheers
  2. I am looking to write a dll that performs some math operations for a RT system on cRIO 9012. The C (dll) code is compiled in using the GNU tool chain for VxWork. I figured to start small with a basic dll and once I had that working and was comfortable expand on it. I am running into a couple hiccups though. Here is the dll file #include <stdio.h> #include <stdlib.h> #include <math.h> extern "C" { double testDLL(double arg_A, double arg_B) { return(arg_A + arg_B); } } extern "C" double testDLL(double arg_A, double arg_B); and here is the test vi program I wrote When I right click on the call library function on the block diagram and configure the parameters, they are set as follows. return type has the type "Numeric" arg1 has the type "Numeric" and data type "Signed 32-bit Integer" and pass by "Value" arg1 has the type "Numeric" and data type "Signed 32-bit Integer" and pass by "Value What I don't understand is what the return type is the same as arg 1. Any insights? Thanks in advance. -fillalph
  3. Hi Gabi, I wasn't able to implement what you were saying, but I did manage to get the code to work. I was curious if someone could help "optimize" the code. Having so many local variables seems like a waste. I don't really need to optimize the code for my application, I am more or less looking to learn. Thanks, fillalph
  4. Hello Everyone, I have uploaded my VI along with a picture of what the output is at the end. I am able to acquire data correctly, no problem with that. The problem I am having is that "Array_Editted" is empty (the 2nd sequence in my code isn't working properly). I tried to step through the code to see where the problem was, but that didn't help. When looking at the probe of array_editted, the values are greyed out. Any suggestions would be greatly appreciated. I have a feeling I am going to feel like an idiot when I figure it out :S Thanks fillalph
  5. Hello Everyone, I have uploaded my VI along with a picture of what the output is at the end. I am able to acquire data correctly, no problem with that. The problem I am having is that "Array_Editted" is empty (the 2nd sequence in my code isn't working properly). I tried to step through the code to see where the problem was, but that didn't help. When looking at the probe of array_editted, the values are greyed out. Any suggestions would be greatly appreciated. I have a feeling I am going to feel like an idiot when I figure it out :S Thanks fillalph
  6. Hello. Sorry tcplomp and JFM. My programming got put on hold while I was busy growing and taking measurements. I just wanted to say thank you. Your solution worked fine. I had to create a "dummy" cluster to use in the for loop since not every iteration passed information. Thank you Philip
  7. Hello Ton. Thanks for your reply. At first I tried to apply what you said in my program and got lost. Then I went back to your display picture and tried to set that up. I do have a question about your block diagram though. How did you get your cluster to have the type display "Status 2"? Mine will only display abc or I32 for example (see my block diagram). Thanks, Philip
  8. First, I would like to thank Ulrich and ooth. Their suggestions here really helped throughout the rest of my program. I had most of the programming working, but I wanted to make some changes to it to make the code easier to look at. One addition was the a subvi to create the file name based on input from the user. The properties from the laser (which were being cycled through in that while loop) make up the name. The way I used to do it was just take the properties out from the loop and add underscores in the main program. This works, but it looks ugly and can hard to follow. I tried to clean it up and make it easier in case someone later wants to add other properties to the filename. The problem now is that the subvi filename.vi starts without any of the variables waiting outside. I thought in Labview that nothing could run until all of the information was ready? Now, I know I asked a question, but I think it has to do with the fact that I disabled indexing. However, when I enable indexing, I get an error that the type cast is wrong because from the loop it needs an array and the subvi is an element. Any suggestions on a fix. Thanks Philip Download File:post-5846-1159259916.vi
  9. Hello Ulrich, Thanks for taking the time to convert to version 7.0 and for taking the time to go through my program and making those corrections and adjustments. Truly appreciated. Philip
  10. Hello, I just would like to say thanks to the people that read the thread and to Ulrich and ooth for their replies. Greatly appreciated. Philip EDIT: Any chance Ulrich that you could save the file you posted in version 7.0? I would like to see the other changes you made. Thanks.
  11. ooth: Thank you. That was what I was looking for. Simple implementation. Ulrich: Even though ooth's way works, I would still (if you have more time) like to try and get your example working since there is always more than one way to do something. Thank you, Philip
  12. Hello Ulrich, Thanks for your quick reply. I am not entirely sure how to implement your idea so I made a small vi trying to sort it out, but didn't quite get it. Again, I attached what I got from your message. If you could quickly clarify that, it would be greatly appreciated. Thanks for taking the time to help a beginner. Philip Download File:post-5846-1155299563.vi
  13. Hello, Before asking my actual question I would like to make a couple of comments. 1. This is truly a beginners question. I tried googling for help with arrays as well as the ni.com website for examples, but couldn't find anything. 2. I searched in this forum, but most of the questions here are far more advanced and difficult than what I am asking. I am university student working abroad at a university in Germany for an 8 month coop term. I am writing this program to automate one of our experiments. [Note: not really relevant to the question, just explaining the program quickly -- most welcome to skip this part]. After entering the values on the front panel (most of this information is just used in the header) the program will set the voltage on the pulsar and then read two voltages across the laser from an oscilliscope). The voltages will be saved to an ascii file with the comment file. My problem (at the moment) is storing the values from the front panel in an array. The program starts and the for loop initializes running through the case structure which holds various variables. The values will be concatenated into a string and then stored in an array <-- problem is here. Do I have to create a local variable that points to my array for the input? I hope my question/problem was described adequately. I feel so embarrassed asking this, but I am stuck. Thanks in advance for any tips, Philip Download File:post-5846-1155294692.llb
×
×
  • Create New...

Important Information

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