09-23-2009 12:58 AM
I am trying to write a CVI/LabWindows 8.0 program to remote control my instrument.
However, after I successfully remote controlled my instrument by sending one command via USB port, the instrument ceases operation and it is "out of hand". In particular, the instrument has no response even I sent another command to exit the Remote Mode.
How can I solve this problem?
Here
09-23-2009 05:53 PM
Hello Maggie214,
Can you provide more informaion regarding...
1) What 'instrument' you are using?
2) What commands are you sending?
3) Is there a screenshot of this error?
Regards,
Glenn
09-23-2009 10:03 PM
Hi Glenn,
I am using PhotoResearch PR-655 spectroradiometer, and here is the commands sent for remote controlling the instrument with the setup commands mentioned in the user manual.
//To enter remote mode "P""H""O""T""O" must be sent as single characters and not as a single string
ComWrt (4, "P", 1);
Delay (0.1);
ComWrt (4, "H", 1);
Delay (0.1);
ComWrt (4, "O", 1);
Delay (0.1);
ComWrt (4, "T", 1);
Delay (0.1);
ComWrt (4, "O", 1);
Delay (0.1);
//To make a measurement and return brightness data, a command must be sent "M""1""[CR]" as single characters, not as a single string
ComWrt (4, "M", 1);
Delay (0.1);
ComWrt (4, "1", 1);
Delay (0.1);
ComWrt (4, "[CR]", 1);
Delay (0.1);
However, after I have sent the "P""H""O""T""O" to remote control it (its screen display shows that it is in REMOTE MODE), the instrument has no further response (it is "Out of Hand"), even I have closed the LabWindows/CVI program, and switch the power off.
The PhotoResearch engineer told me that it is normal for the keyboard functions to cease operation when the instrument is in Remote Mode. But I do not understand what it means? How can I do to write a program without using the keyboard? How can I solve this cease operation problem?
Thank you very much for your kind help!
Maggie
09-23-2009 11:19 PM
The support engineer is almost certainly talking about the keypad on the instrument being locked out. It would be silly to think that your pc's keyboard could be disabled.
The product page says that there is a fully documented dll that you can use for remote control. I have no idea what it costs but that might be a better option than you struggling to do everything from scratch.
If you pursue the 'write your own driver' course and need help with that, it would be necessary for you to post the programming manual.
09-23-2009 11:44 PM
Hi Dennis Knutson,
I have asked about the dll (dynamic link library); however, the support engineer told me that it is not required for remote control my instrument. He said that I can just write ASCII commands to remote control it.
Actually I don't understand what is the use of dll. Is it a library that I can use in LabWindows/CVI 8.0 just like other library, e.g. RS232, GPIB488.2,..., after I add this library into my program?
Sorry that I am a beginner of the LabWindows/CVI. Here is the programming manual. Would you mind to help me to solve the cease problem? Attached please find the extracted user manual on how to send the remote command.
Thank you very much for your kind help!
Maggie
09-23-2009 11:50 PM
You should first search for an ANSI C programming tutorial or one specific to CVI. Calling a dll is a pretty basic task.
As I mentioned once before, I have not used this com function. I prefer to use VISA. However, I don't think you are sending the CR (Carriage Return) correctly. I think you are sending the characters '[', 'C', 'R', and ']' and that is not at all the same thing.