04-15-2021 10:12 AM
How can we create the multitasking commands as follow for my application in LabView program.
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.
Solved! Go to Solution.
04-15-2021 10:50 AM - edited 04-15-2021 10:54 AM
"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.
04-15-2021 10:54 AM
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.
04-15-2021 10:58 AM
@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?
04-15-2021 11:13 AM
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.
04-15-2021 11:17 AM - edited 04-15-2021 11:18 AM
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:
04-15-2021 12:44 PM
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.
04-15-2021 01:57 PM
@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.
04-15-2021 02:11 PM
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…