01-17-2025 01:34 AM
Hi everyone,
I’m working on a LabVIEW application to control a Mark-10 device (specifically to set and control the distance) via the VISA serial communication interface. So far, I’ve successfully established communication and can read the distance value by sending the "x" command. However, I’m having trouble implementing a feature to set the distance from my LabVIEW VI instead of using the physical Mark-10 control panel.
Here’s what I’ve done so far:
Attached is a screenshot of my block diagram. The VI logic attempts to send a formatted command to move to a specific distance.
My questions are:
Any help, example VIs, or troubleshooting tips would be greatly appreciated. Thank you!
01-17-2025 03:55 PM
A quick google shows me that there is LabVIEW Serial Write / Read VI under Software and Driver Downloads | Mark-10 Force and Torque Measurement
01-18-2025 01:19 AM
Actually, no, it doesn't provide an option for controlling movement (e.g., going up or down). The LabVIEW VISA functionality works only for reading data from the Mark-10 device in this context. If you need to send movement commands, you might need to review the Mark-10 manual for the correct syntax or ensure your commands match the expected format for proper execution.
01-19-2025 06:53 AM
@tonyju wrote:
Actually, no, it doesn't provide an option for controlling movement (e.g., going up or down). The LabVIEW VISA functionality works only for reading data from the Mark-10 device in this context. If you need to send movement commands, you might need to review the Mark-10 manual for the correct syntax or ensure your commands match the expected format for proper execution.
That is not true. The VI is a simple serial communication program, and not a good one at that (use of Bytes at Serial Port is acceptable for a pure console type application but never for instrument control with commands).
What the VI does is determined by the command string in the "String to Write" control, which by default is set to ?\r. This queries the current position, that's it. Nobody prevents you from entering a different command in that command string as mentioned in the accompanying document, which says "Refer to applicable Mark-10 user’s guides for a listing of serial port commands."