LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create the multitasking command instruction for the device?

Solved!
Go to solution

How can we create the multitasking commands as follow for my application in LabView program. 

 

37.png

 

I have made the program but I can only execute one command at time. Any suggestion?

. I am thinking to use the flat sequence structure with duplicate frames but is there any other way to do such that user can choose the type and create the several commands and execute them together.  

0 Kudos
Message 1 of 9
(2,061 Views)

"Q"? Never heard of it... You are going to need to supply a lot more information here...

 

What is "Q"? It looks sort of like BASIC

What is the device you are programming?

Do you have a programming reference for other programming languages?

 

What exactly are you trying to do?

 

Also in general you can only send a device one command at a time (most communications are serial) and in reality the vast majority of devices can really only execute one command at at time. Modern operating systems can make it seem like they are multitasking  but they are really "task switching", except in the case of multi-core processors when the program is written to properly use them.

 

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 9
(2,047 Views)

thanks,

 

I thought question was very clear, I already have program for the single command to the motor and response. I would like to create multitasking command so that it can perform the application. Q program is just simple example. 

0 Kudos
Message 3 of 9
(2,039 Views)

@skdubey wrote:

thanks,

 

I thought question was very clear, I already have program for the single command to the motor and response. I would like to create multitasking command so that it can perform the application. Q program is just simple example. 


 

Well I still don't understand what you mean by "multitasking" in this instance.

 

Do you want to just blast all the commands in one shot instead of sending them one at a time and waiting for an acknowledgment? 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 9
(2,031 Views)

Yeah something like that, For example we create the segments (group of commands) and user can sent this command to Visa write box  one at time. I just to check is there way, I can optimize my program in such way.

 

0 Kudos
Message 5 of 9
(2,014 Views)
Solution
Accepted by topic author skdubey

Sounds like you want to create a program that will send a sequence of commands to your device.  As RTSLVU has said, this has nothing to do with multitasking.

 

If you have a VI that can send one command you want to put it in a loop, then make an array of commands, wire the array to the loop and it will default to auto-indexing the commands into the loop one at a time.  If you were using VISA comms it would be something like this:

NIquist_0-1618503375594.png

 

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 6 of 9
(2,009 Views)

So In the array of command the bottom command will be the first command to read, I am sorry, about the confusion how does that array will be read : top to bottom or bottom to top. Can I create toggle to stop the program if there is any trouble. 

0 Kudos
Message 7 of 9
(1,987 Views)

@skdubey wrote:

So In the array of command the bottom command will be the first command to read, I am sorry, about the confusion how does that array will be read : top to bottom or bottom to top. Can I create toggle to stop the program if there is any trouble. 


Top to bottom.

 

You can enable the "conditional terminal" on the FOR loop to stop the loop early.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 9
(1,975 Views)

Hi skdubey,

 


@skdubey wrote:

I am sorry, about the confusion how does that array will be read : top to bottom or bottom to top.


You REALLY should take all those "Training resources" as offered in the header of the LabVIEW board when you don't know how autoindexing at loop borders works…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 9
(1,971 Views)