11-20-2016 02:39 PM
I have a problem with tunneling the strings comming from a for loop to the VISA Write VI. The for loop generates drive commands ( for example DRV 50,75) with a curtain frequency. Those commands have to send directly with the VISA Write VI. The tunneling is the problem. If I chose the Tunnel Mode "Last Value", only the last command is send. How to solve this problem???
Thanks and regards...
11-20-2016 02:56 PM
Maybe the complete VI helps more...
11-20-2016 03:13 PM
Please take some LabVIEW tutorials and learn about dataflow.
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours
It has nothing to do with tunnel mode. Your VISA Write will never execute. You have loops buried in loops. Your inner while loop has a false wired to the stop constant which means that loop will never end without aborting your VI. Due to dataflow, your VISA write won't execute until your while loop ends, which it can never do.
11-20-2016 06:08 PM - edited 11-20-2016 06:15 PM
Ignoring all the other rookie mistakes in your code. If you want to send a series of commands to an instrument using VISA Write do it like this.
Build an array of your commands and index them with a for loop to send them one at a time, remember to wait long enough between commands to allow your instrument to process that command before sending another one.
11-25-2016 02:02 PM
The intension was something like that, sending one specific command (for the time being) with two parameters to drive two motors (in %): DRV 75,75\n and than waiting for a response for the position: POS 127896,127869\n of the shaft encoders. Now I am programming it step by step, let the target send every second a position response, but have a problem at VISA read. At configuration of the serial port I enable the termination char for \n in the hope that the stream of responses is split up in separate responses. The length of the response (position) is variable, so at VISA read vi I define the byte count > is the number of response characters. Then I split op the individual responses in tokens, convert the strings to integers and plot them. The result works with strange behavior. The incrementing values of the positions fall back to zero after every good sample. What is the reason? See also the two images.
Thanks and regards...
11-26-2016 03:59 AM
The write problem is solved. On the read problem I am working and then the integration of both so they can work autonomous in one vi. Any recommendations?
Thanks and regards....
12-19-2017 05:00 PM
What is the point of demeaning someone online?
12-19-2017 05:04 PM
What's the point of dredging up a post that is over a year old to make a comment like that?
12-19-2017 05:06 PM
Why does the date of the comment matter? It was still rude.
12-19-2017 05:09 PM
@MT6292 wrote:
What is the point of demeaning someone online?
What is the point of making that point a year later? 😉
Actually, I've learned that you must have some thick skin to stay in the game here. And I have to admit that I have treated some noobs rather roughly. Usually unintentionally, but that's... usually. No one is perfect in this regard, but we try to be reasonable. I assume you are referring to RTSLVU's post. Unfortunately, I have seen - as well as been - worse than that. 😞