LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to select the specific channels attached to specific "create virtual channel"

Solved!
Go to solution

It's not too hard, you just need to figure out how to edit the enum selector to add cases and you're in. There's a lot of documentation on there that looks a bit scary when you first open it up, but it really doesn't have a lot going on. Also, the cases that are included in the template are mostly just examples (button press, etc.) that you can delete or replace with your cases.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 21 of 35
(1,294 Views)

Ok, thank you.

 

And what with the configuration of the multiple channels? Do I need to place them next to the "button press" example? Or do i need to make a button that refers to the configuration of the channels, so the configuration pops up when I press the button?

 

 

With kind regards,

 

Peter

0 Kudos
Message 22 of 35
(1,290 Views)

You can really do whatever you want now with the buttons and cases to make the application work the way you want. It's up to you and how you want it to operate. The beauty of this architecture is that it's really easy to add new user events (button presses, data edits, etc.) that trigger new cases.

 

If you want the channels to be set up when the user presses "Initialize Channels" you can change the name of that button and add an "Initialize Channels" case that gets run when that button is pressed.

If you want the just channels to get set up when the user first runs the program, then you put that channel initialization code in the Initialize case.

 

You usually don't need to set the value for the tab control like you were in the original program (becuase the user can click a tab if they want). But within those tabs you can have the buttons like the ones I mentioned above to actually do the action.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 23 of 35
(1,284 Views)

Dear James,

 

I've tried to work with the simple state machine template. I was amazed about how it worked, but this was only when I connected a dummy signal... When I now connect the real signal from the cDaq 9171 connected with a LVDT, the process is really going very slow.. I only get 1 sample for like every 2 seconds... 

 

How does it come that this work so slowly?

 

I really want to graduate, but getting the program to read and to display my signals is so difficult.. If i would have a good program that acquires the data in a good way, the signal operations I need to do to become the stress strain curve will be easy, but now, I'm still trying to become a good data acquisition program for like 6 months.. And I still have got nothing 😞

 

With kind regards, 

 

Peter

0 Kudos
Message 24 of 35
(1,234 Views)

You attached your Project, but that doesn't include all of the VIs. Please include your whole directory, or click Save As > Duplicate Hierarchy

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 25 of 35
(1,226 Views)

I'm sorry, this is the working program.. I've saved the previous upload in the wrong way.

 

With kind regards,

 

Peter

 

0 Kudos
Message 26 of 35
(1,224 Views)

I'm sorry, James, is this what you mean?

 

With kind regards.

 

 

0 Kudos
Message 27 of 35
(1,221 Views)

You should try to incorporate more user interface functionality. What you have isn't a state machine, it just runs through each case one by one and then ends. You need to add an Idle state that has an even structure that triggered the other states. You could have a "Go" state that starts the acquisition and then starts acquiring data over and over, and then a Stop state the end it.

 

Now the way your application currently works is its just collecting one data point... so how do you expect it to collect faster? You need to loop through the Acquire state (minus the Start and Stop VIs) over and over to collect more data. OR you could configure the acquire to collect multiple samples at a certain rate.

 

You say that this is "difficult", but it really isn't very hard, you just need to follow some examples and learn a bit more. That's the whole purpose of school, right?

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 28 of 35
(1,192 Views)

Thank you for your reply.

 

i'm not saying the program I have now is difficult 😛 I know this is very easy, but to get to a great working program is difficult, I've tried already multiple versions, and It was constantly becoming to complicated (for me) to achieve to fix the problems... 

 

So in the Idle, there needs to be that "go" button that triggers the acquire data, the display data and the save data at the same time?  And what about the configuration of the channels? Does they need to be in the Idle state as well? Or do you need to put a button in the idle state that triggers the configuration state?

 

If you have the time, is it possible to make a simple example of this, because I don't understand how to do this 😕

 

With kind regards, 

 

Peter

 

 

0 Kudos
Message 29 of 35
(1,185 Views)

Dear,

 

Nevermind about the example, I will first try to work with those buttons and I will keep you up to dated. I've watched the template again and I understand it a little bit more now. But I guess I will need to work with a tab control too. So on the first tab (and also the idle state) the buttons for : configurate channels, acquire data, stop, etc...  Then the "configurate channels button" triggers the 2nd tab and the configurate state, when the configuration is over, a button on that tab brings me back to the first tab ( the idle state), right? Then I can click on the "acquire data" button, and it will trigger the 3th tab (with a chart etc) and the acquire data state. 

 

Is this the right way of thinking?

 

With kind regards,

 

Peter

0 Kudos
Message 30 of 35
(1,176 Views)