Jump to content

pkeny

Members
  • Content Count

    12
  • Joined

  • Last visited

Community Reputation

0

About pkeny

  • Rank
    Active

LabVIEW Information

  • Version
    LabVIEW 2013
  • Since
    2014
  1. Hello, I have made an attempt to get this. Based on my text file, column 0 is pin number, column 4 is status. I have it so column 1 (status) is working. The next parts are not, which is an iteration. I tried to do this in the while loop, but I cannot seem to figure it out. Anyways, what I want in the while loop is, based on my text file is: (Start at column 2) 1)Wait 2 seconds, turn boolean array index 0 off 2)wait 3 seconds, turn boolean array index 1 off. 3)wait 2 seconds, turn boolean array index 2 on. 4) wait 4 seconds, turn boolean array index 3 on. 5)wait 4
  2. Very good and efficient code. Close to what I want. Your code reads it row by row. I want to read it column by column. So, using my attached text file as an example, your code will go row by row. So, it will first turn on pin 0, then wait 1ms then turn it off then wait 1ms and then turn it on, and then turn pin 1 on...and so on... What I want is for it to read column by column. So what I want is that it will first perform: pin 0 on, pin 1 on, pin 2 off, pin 3 on....to pin 10.... and then it will wait 1 ms and turn pin 0 off, wait 1 ms turn pin 1 off, wait 1 ms turn pin 2 on....all
  3. I apologize if I have not been clear. I do not want something complex, but I understand that I might need to have something complex. Anyways, it really does not matter whether I have it sequentially, or simultaneously, but since I already have it so the delay happens sequentially it is okay for such. So, what I want is: 1. Pin > 2. Status > 3, Wait > 4. Iterate through step 2 and step 3 until no more columns left in text file. So, for step 4, the iteration should look like: Status>Wait>Status>Wait>status>wait>status>wait>status>end. T
  4. Thank you for that, Also, I am just using the stop command for now as a placebo to remind me to fill in that section later. Now, I have another question, how can I accomplish my task programmably versus me hardcoding it in. For an example, currently on the text document one can have a maximum of one delay, so labVIEW will go through pins status once, then delay, then go through the pins status again. However, can someone help me with the logic to create a way to do that programmably so instead I can go through the pins status 100 times with a delay in between?
  5. Hey all, I am trying to create a fairly large program. What I want to do is for someone to upload a text file, customized so I can create statements for it, and then labVIEW will read the the text file and perform actions. Specifically, the text will contain pin numbers, on/off status, wait delay, and another on/off status. The pin numbers correspond to a Boolean indicator array. The on/off status tell the Boolean indicator array to turn on/off. The wait delay tells the program to wait how long before changing the indicator array value again, and the second on/off status turns the
  6. Thank you Infinite, I could not figure out how to setup my event structure so that it will execute when my data array changes, and it will still set the local variable to false. However, I found a workaround using a case structure instead of an event structure. The case structure will occur when the stop button is pressed and then it will set the local variable to false. Now, I have another question, hopefully this is the last one. When I open my program my boolean array is not initialized on the front panel. It is grayed out. So, the program will have an error since my task contains
  7. To me, it seems that the logic is correct. When the stop button is pressed it returns a value of true. So I send it through a not gate, which will make it false. Then use that false value to initialize an array containing all false values with the same size as the number of elements in the switch array. Next, I send it to the event structure which will execute if the stop value changes. So when the stop value changes, it will give a false value to the boolean switch array's local variable, which should set them all to false. I cannot understand why it would set them to true. And especi
  8. Ah, thank you for clarifying that. I believe I have made a much more efficient daq VI. However, I have a problem that I cannot figure out. In this VI, I have made a task that includes 8 lines. Then I have a boolean array of push buttons which will toggle the write data on/off. I also have a stop button that will end the while loop and stop writing. However, I want to make it so that the when the user presses the stop button, it will reset all the boolean switches to off (false). So, in order to do that I made an event structure that contains a local variable for the boolean switch
  9. Thank you guys for your answers, After moving my stop, clear, and error daq blocks to outside the loop, the program now is able to switch on and off in about a second. I have been told using daq assistant is a very bad idea from other people. They tell me they always get errors and using daq accomplishes the same task as using daq assistant but more efficiently (I'm probably not using daq correctly so using daq assistant might be better). So, anyways I really want to learn efficient use of daq.
  10. That example can only write to one line at a time since the channel line entering through that while loop only contains one line (At least that is what I think it does). However, I think the reason why my code is inefficient is because I am stopping and clearing every time in my while loop. And my stop button logic has way to many not gates I could probably combine it into one not gate and send that out to multiple writes. Is that something that would fix my inefficiency? Or could it be that I have a fatal flaw in my program that I am not realizing through this example and my program.
  11. Hello, I have created a vi that controls multiple writes (individually) by a switch. I have it so one individual switch controls one individual write (And is linked to individual clear, stop, error daqmx blocks). I do not think this is efficient as it takes about 4-6 seconds for the switch to actually write (True or False). So, I was wondering if someone could help me make my code more efficient so it would run a bit faster. Thank you Digital Outs fine.vi
  12. Hello, I am having trouble on learning what to do after you input a file into labVIEW. I cannot seem to find help on this topics. I have seen many videos and tutorials on how to read and write excel/text (.csv) files. But, I am not able to do anything after importing an text/excel file into labVIEW. So, I was wondering if someone had a simple VI that they could share. In the end, I want to do some automation so it will read a number and a status from excel. And then that number and status will either turn on or off a switch which controls something else. Anyways, I would greatly a
×
×
  • Create New...

Important Information

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