LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to operate a case on clicking the button

sorry for the truoble I forgot to attach my VI in the prevoius post on the same problem. here the problem is that the case loop which had the selector terminal with boolean is not working wjen I switch it on. it remained off. I need to stop a motor using this loop. Is it possible? If yes then help me

0 Kudos
Message 1 of 10
(2,520 Views)

Its very confusing. Let me know what you want to acheive through this. One more thing you never mentioned any kind of serial communication in your question.

 

What is your input & output. I will try to implement this.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 2 of 10
(2,509 Views)

here i'am converting the decimals to ascii numbers of 0ne byte which the motor takes. And The first frame of case loop which is given button is the loop contains the command for stopping the motor, but characteristically, the motor needs some end commands such that I put the end commands which will be taken one by one in ascii format. So how we can implement a program such that after the execution of running commands (outside the buttoned case loop), if the button is on state it should execute the stop command and after the motor replies, if it is equal to the stop command code the the second case loop shouldwork and erminate the port. If you can, Please help me to overcoem this problemn

0 Kudos
Message 3 of 10
(2,502 Views)

See first you need to understand something about serial communication.

 

1. In one VI there must & should be only one read & write VISA function.

2. Why can't you send each time termination character along with your data what you are sending which will help to terminate the communication each time.

3. When you want to terminate the just press stop button. It will complete the current processing and terminate the loop.

4. There is an option to terminate the serial communication when termination character is encountered when you are configuring the VI. Hence you dont need to do anything seperately.

 

Try to implement in this way & let me know

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 4 of 10
(2,497 Views)

in my motor there are termination commands seperately if i'am not sending them the next time it will not work.what i have to do

0 Kudos
Message 5 of 10
(2,485 Views)

Thats what i am telling you send termination character each time.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 6 of 10
(2,474 Views)

termination character can be applied only if the motor stops at the limit or manually stopped in both cases, the case loop sends these commands but when I start for the run it is not taking the commands. Please try to understand my problem

0 Kudos
Message 7 of 10
(2,459 Views)

Your dataflow causes the for loop to execute at the same time as the case-structure so you'll try to write 2 commands at once to the device. I doubt that's the idea.

You have autoindexing on the for loop, so the connected "9" is unnecessary.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 10
(2,453 Views)

First of all you can't apply termination character instead you can send it.

 

***************************************************************************************************************************************

perumpadapu wrote:

 

termination character can be applied only if the motor stops at the limit or manually stopped in both cases, the case loop sends these commands but when I start for the run it is not taking the commands. Please try to understand my problem

 

***************************************************************************************************************************************

 

Termination character is sent only when motor stopped right ?

Next time your labview is not sending the command or you are not receiving the response ?

 

Please be specific about your problem

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 9 of 10
(2,449 Views)

The VI you posted makes no sense at all. You really need to step back, take some LabVIEW tutorials and rethink your architecture. Once you start your VI, changing the Boolean controls is not going to do anything. You probably need a state machine or event structure but sorry, I don't understand your descriptions at all.

0 Kudos
Message 10 of 10
(2,431 Views)