09-29-2023 03:31 PM
Hello Folks,
Greetings!!
I am working on simple logic to turn laser on and off through serial port and string commands. I need to call CRLF as a terminator to do so (OK\r\n). I tried with different logics but somehow I am ending up with error at VISA read function. I tried to debug it but response was the same.
I would really appreciate if someone helps/supports me on this. I have attached the two screenshot for reference that I tried with.
Your help will highly appreciated.
Looking forward to hearing from someone.
09-30-2023 07:54 AM
It seems you set the termination character wrong.
Please use the settings in visa settings and don't set the termination character to an idiot value afterwards. It should be 10 in decimal for Linefeed.
The screenshot with debug on, shows this error.
Even better that you send the via next to the screenshot, because we can easily edit and send an improved version back.
10-02-2023 11:49 AM
Hello Albert,
Greetings of the day!
Many thanks for your prompt response. Could you please send me the revised sketch so that I can get to know were exactly I need to make the necessary changes in the VI. It will be a great help and I would appreciate it!!
Looking forward to hear from you.
Thanks
10-02-2023 10:57 PM
10-03-2023 09:58 AM
Hello Albert,
Please find the attached vi file. Please let me know if you need anything else. Many thanks for your support and help.
Thanks,
10-04-2023 11:38 AM
10-04-2023 11:45 AM
Good evening.
Below my changes to the vi.
I changed the display mode of the constant string into backslash mode.
I also changed the termination symbol into a Line Feed.
I also ask too many characters.
This is not a problem because your instrument sends a Line Feed as end character VISA will read it correctly.
10-04-2023 03:06 PM
Hello Albert,
Good Evening,
Many thanks for your prompt reply and attachment. I am grateful for your support and help being provided. I checked it on hardware by connecting my Laser diode to my PC, its works fine!! Without any error.
Thanks you so much for the help!!
I will be in touch with you if I need any help on this further.
If you don't mind, could you please share me your email id.
Many thanks for your reply and help.
Regards,
Madhu
10-07-2023 01:20 PM
Hello Albert,
Good morning!!
Yes, it did solve my problem and working fine with the hardware (Laser diode).
Thank you so much for your help.
Regards,
Madhusudan