02-17-2013 10:58 PM
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
02-17-2013 11:44 PM
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.
02-18-2013 12:00 AM
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
02-18-2013 12:20 AM
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
02-18-2013 12:31 AM
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
02-18-2013 12:51 AM
Thats what i am telling you send termination character each time.
02-18-2013 03:34 AM
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
02-18-2013 04:13 AM
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
02-18-2013 04:32 AM
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
02-18-2013 10:04 AM
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.