Jump to content

c_w_k

Members
  • Posts

    27
  • Joined

  • Last visited

Everything posted by c_w_k

  1. We were able to find out what it was.....the DLL that we were calling uses winapi calling conventions, LabVIEW 8.6 is smart enough to realize this so you don't have to set that when configuring your library function node - so I did not have this configured in 8.6 and it was still working, LabVIEW 8.2 is not smart enough to realize this......so since that was not set in LabVIEW 8.6 once it was saved for 8.2 it thought it was supposed to use the C convention instead of winapi ......after we changed that it worked fine. Thanks CK
  2. I mean our DLL's and folder structures are the same but the computers are not exactly the same themselves......we also tried building the function call from scratch in 8.2 - it wouldn't work then either......
  3. No the machines are not identical? If I created a VI in labVIEW 8.6 and used the "save for previous version 8.2" utility....would i need to have identical machines to run the vi???
  4. hello, I created a vi that works just fine in LabVIEW 8.6 I then saved it for a previous version and gave it to my co-worker who has LabVIEW 8.2 on his machine. He is able to open the VI but when it gets to a certain function call it crashes. The function call is calling a c++ dll (which he has in the same location as I do on my machine) the parameters of the function are: String (c string pointer), double, long, double, *short Not sure why its unable to call one function and the other is making it crash.... Thanks for any and all help CK here is the function call that is causing LabVIEW 8.2 to crash.......It was created in LabVIEW 8.6 and saved for a previous version. -CK
  5. Hello, I'm trying to figure out a way to parse a number in labVIEW. I will have a number that ranges from 101 to 416 and I need to separate the first digit from the last two digits of the number. So far the only way I can think if is to determine if the number is in the 100, 200, 300, or 400 range and then subtract that from the the input, so for example if my number is 416 then I can determine that it is greater than 400 so I would then know to subtract 400 from my number so 416-400=16 so that gives me the last two digits. Is there a better way of doing this? Thanks CK
  6. Never mind... after looking around this is easy....just need to click the "Select VI..." button, not sure how i missed that before. problem solved by myself... -CK
  7. hello, I'm wondering if anyone can explain how to call an external VI from another VI. I'm wanting to press a "Start" button on one vi and once the start button is pressed I want another VI to be called that actually executes the start function. I don't think this should be very hard to do but I've tried looking and haven't seen anything yet. Thanks Chad
  8. I know its been a while, I was finally able to spend some time looking at this and was able to get it to work, thanks to everyone who mentioned the Open G library and who gave pointers on how to use it. I've attached a screen shot of my code... I have an INI file (CK.ini) that I want to read in from a file, I create a cluster that matches section1 of my ini file, then wire that cluster to the Read VI, then I wire the variant outcome of the Read VI to the Variant To Data (also need to wire the cluster to this)...then I have my original cluster back. (Thanks Yair)then I just unbundle the cluster. -CK
  9. Right, only 1 was in the drop down list, even when I extended the list.....however, after looking over all pieces of my code I found an error .....it was only gathering 1 piece of information into the array...therefore there was only 1 element....thats why I was not seeing the second element. The post you made above worked fine for me as well both with integers and strings......sorry for the false issue, I appreciate your efforts in trying to help me. Thanks CK
  10. Thats what I am trying to do, except with a string array, their are only 2 elements in my array right now but I can only see the "0" element of the array. The string array that I am using is dynamic, based on how many devices are found on the network it could contain 2 or more elements. I'm using a local variable of the array to plug into the combo box properties node. also, I can see both elements in the actual array....just not in the combo box.
  11. Hello, I'm sure this is going to be a simple solution, but I'm trying to simply populate a combo box with values that have been put into a string array. I can get the first element of the array to show up in the combo box but not the second element. Any solutions or ideas would be greatly appreciated. I've attached the section of code that I'm trying to accomplish this with. I'm trying to get the name of the devices (which i get back from a dll), I put the names of the devices into the stringOptions array, and then I input the stringOption array into the String values of the Combo Box properties node....this will show the first element of the array in my combo box, but not the second. Thanks CK
  12. 1970 epoch = 21600 (hopefully these are right, found them on a website that calculates epoch dates) 1904 epoch = -2082823200 ====================== difference of -2082844800 so I added -2082844800 to the variable that is sent in from my C++ DLL......and I now get a year of 2246, which isn't as bad as being off by 300 years....but i've still got a ways to go.....the DLL is getting the value from a device simulator so I wonder if it is sending a bogus number.....
  13. Hello, One of my many questions is on creating a timestamp in LabVIEW.... I'm getting a value from a C++ DLL that returns the seconds since 01/01/1970 ("epoch"). I'm then trying to use the LabVIEW "SecondsToDate/Time" vi to convert this to a readable time format. When I do this the date is off by 300 years.....is there a trick to doing this? Is the labVIEW "SecondsToDate/Time" vi capable of converting time from 01/01/1970 or does it use a different date to convert from?? I'm wondering if it may be easier to create a timestamp just by using labVIEW instead of trying to convert the epoch variable that is returned by the C++ dll? For example my vi is gathering data constantly from a device, instead of taking the epoch variable from the C++ code I think I could possibly create a labVIEW time stamp each time the vi collects data........my first choice would be to convert the epoch variable that is provided from the C++ DLL..... so any help on taking a C++ variable and converting it into a timestamp in LabVIEW would be greatly appreciated... I've attached below, the code that I have so far.... -CK
  14. Okay, so I'm trying the OpenG vi for this.... Right now I'm just using a simple ini that consist of : [section1] key1=123 key2=456 key3=789 [section2] key1=1000 key2=2000 key3=3000 In my labVIEW code on the block diagram I have the path of the INI going to the "Open Config Data.vi" which connects to the "Read INI Cluster"......Do I need to actually create a cluster in labVIEW that contains everything in the INI file?(Currently I do and have that feeding into the "Read INI Cluster" vi. I'm not sure exactly what I should be doing on this part. I have the output of the "Read INI Cluster" set as a "INI Formatted Cluster" indicator.....on my labVIEW program I can see all of the values but they look like this: "->123 instead of just looking like: 123 I'm not sure how I can separate these values out by themselves either....so for instance, if I only want to use "key1".....if I were able to unbundle by name then i could do it...but i'm not seeing that option. I've attached of the block diagram as well as the output that i am getting on the front panel. Thanks for any help CK
  15. Thanks for all the feedback on the OpenG INI vi's, I'm going to give them a shot now....
  16. After doing some research i'm able to answer my own question here's the link that I found... http://zone.ni.com/reference/en-XX/help/371361B-01/lvconcepts/creating_configuration_files/ thanks jcarmody for the link, didn't see your post before i posted back i was able to get it working.
  17. Hello, I've been learning labVIEW over the past year so I have lots of questions.... Currently I have a simple vi that takes in 15 parameters (the parameters only need to change if the user is connecting to a different device). I'm wondering if I could use an INI file to set the 15 parameters instead of having the user enter everything manually? I don't have much experience with INI files either so if anyone can help me or point me in the direction of a good tutorial on this I would appreciate it greatly. Sorry if I haven't included enough information, if anyone needs extra info in order to help me out please ask. Thanks CK
  18. Ned, I have no LabVIEW code yet for this. I have a C++ struct, from that I get the s0 and s1 variables, I want to compare these variables with the old_s0 and old_s1 variables. I have set the variables of "old_s0" and "old_s1" to a value of "-1" because the first value from the s0 and s1 variables will be "0". So for example, if s0 has a value of "0" and s0_old has a current value of "-1"......since these do not match, I want to set the value of s0_old to the value of s0, and the same for s1 and s1_old. The status struct is in a loop so the s0 and s1 variables will always keep adding by 1 but they start at zero....
  19. Hello, I'm wondering how I should go about creating variables in LabVIEW, I'm trying to do the following C++ code in LabVIEW. Its a very simple to do in C++ and I'm sure it is in LabVIEW, but I'm new to LabVIEW and haven't came across this situation yet. myStruct status; old_s0; old_s1; old_s0 = -1; old_s1 = -1; if( status.s0 != old_s0 || status.s1 != old_s1 ) { old_s0 = status.s0; <-----------this is the part that i'm confused on, how can i make a variable that i can change the value of old_s1 = status.s1; <-----------old_s0 and old_s1. } thanks for any and all ideas -CK
  20. Hello, I'm trying to create a timestamp in LabVIEW, I get a timestamp variable from my C++ dll that is epoch (seconds since 00:00:00 January 1, 1970) - I think try to use the "seconds to data/time" function in labVIEW to convert it to a timestamp....the problem is, my timestamp is off by 303 years (just a lil off ). Is it possible to use the C++ variable to get a timestamp in LabVIEW? I think I read somewhere that LabVIEW uses the year 1904 for timestamps??? I'm not real familiar with creating timestamps.... I've attached screen shots of my code and the result... Thanks in advance for any help. -Chad NOTE: The code above is something I tried (the 1000 x tm....thinking the milliseconds might have been off, the code that produced the results that are shown is actually the code below, sorry about that... ) -Chad
  21. Hello, I wondering how I can translate my C++ code that uses a "bit field", into LabVIEW code..... I have a C++ structure that contains a field of data type short that is a bit field: structure : status short done; // completion flag, this is a bit field // bit 0 is on when an acquistion is in progress // bit 1 is on when the FIFO contains a complete coad // bit 2 is on when a FIFO underrun has occured I need to use the field in an if statement as follows: if(ret == 0) && (status.done & 0x2)) -> this is the part I'm wanting to no how to do in LabVIEW...... { //do whats needed.... } Thanks CK
  22. Hello, I'm having some issues trying to output data from an array to a table. My array is of datatype long. I'm trying to use a for loop that will write each element to a table, I've tried using the "Index" tool under arrays, for some reason it is expecting an array of type double......I cannot find a way to change the datatype representation for the "index" tool. Basically....all I need to do is take the information that I've gathered in my array and then output that to a table. Anyone have any ideas? Thanks Chad
  23. Rolf / Adam, I was able to get this to work.....I'm wondering if there is a better way of doing this......I've attached a screenshot of the code I used. Now I just need to clean up on the front end so that only the returned values appear.....I'm trying to some how hide the "name" cluster that has not yet been converted to a string so that only the converted cluster appears....I'll keep looking for a way to do this. thanks for your help Chad
  24. Adam, Now that I think i've got Rolf's way of doing to it to work for me, I've went back and tried setting everything up how you mentioned. I've configured the CLN so that it takes a short parameter and an "ADAPT to TYPE" parameter (also selected array data pointer). and for some reason it is crashing LabVIEW. I'm wondering if I need to handle the char[32] name and char[3] pad differently in my cluster...currently i've just got configured as LabVIEW strings... I will try posting some screen shots of what i'm seeing crash wise later tonight when I get home. Thanks for any advice on this -Chad
×
×
  • Create New...

Important Information

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