05-20-2015 09:58 AM
I am in the process of trying to remotely control a K&L bandpass filter. Their programming manual is very vague, and I'm new to these types of devices. Their manual suggests that the commands are simply bit, or byte, strings.
To get status, byte 0 is set to decimal 1. The command is byte 1, and set to decimal 8. Byte 2 is the command size and set to a decimal 32. Byte 3 is set to 0. So, I'm assuming that I need to transmit a command formatted thusly:
00000001000000100010000000000000CR
The box doesn't not respond, and the connection times out.
I've even tried hex
01082000CR
And I get nothing back. Does anyone have any experience with K&L Microwave LPI bandpass filters that might be able to put me on the right track?
Thanks!
Solved! Go to Solution.
05-20-2015 10:21 AM
Do you have a manual from K&L? I checked their Web site, but without knowing the exact model number, I couldn't find "generic" information on their tunable filters. Sounds like your best bet (unless one of us has direct experience) is to contact K&L for more information.
Bob Schor
P.S. -- the easiest way to "tinker" with a device and try to see what makes it tick is to connect it (you don't say what sort of connection you are using) to your PC, fire up MAX, and see if it can "see" your device (it may be on a COM or Visa port). If so, you can easily send strings to it, and see what, if anything, it returns to you. You can easily experiment with end-of-line characters (does it want \r, \n, \r\n, \n\r?) and other things.
05-20-2015 10:30 AM - edited 05-20-2015 10:31 AM
It sounds like you need something like this. Of course, I am assuming a serial port is used for communications.
05-20-2015 11:06 AM
Thanks, Bob & Crossrulz, for your replies. Yes, I forgot to mention how I'm connected. These boxes are connected over the LAN, so I'm using TCP/IP protocols.
I do have a programming manual from K&L, but it is the most poorly written manual I have ever encountered. It appears they don't have a support network, so I have to appeal to the sales staff for help, and they're not very responsive.
I am able to open a TCP connection. I have formatted hard coded command strings to set over the network. I am assuming they are to be CR terminated, but I'll try CRLF next, and other combinations as necessary.
Thanks!
05-20-2015 12:56 PM
05-20-2015 02:24 PM
Attached isthe prototype function I am using. I can ping the filter, and I can connect through LV TCP function calls. I can see the box on the NI Visa Respirce Manager, but not with MAX. I can't send any commands successfully via any mode. The PDF manual won't upload for some reason.
Thanks!
05-20-2015 02:27 PM
BMP of the command attempted.
05-20-2015 05:22 PM
We need a lot more than that table for building up a proper command. What are the commands that can go into the Command ID? I also do not see any mention of a termination character. Please provide a link to the full manual if possible.
05-21-2015 06:17 AM
And now you understand my problem. That's all the K&L manual gives for commanding its filter. I've queried the company for a more detailed explanation, and have yet to get a response. I've consulted with other site programmers, and my resident panel of experts is stumped, too.
Laying awake in the late hours of the evening pondering this dilemma, it occurred to me that I may have to treat this as a ModBus programming exercise.
Thanks, Knights of Ni, for your time and effort in this matter!
06-17-2015 01:15 PM
I finally got an answer from K&L. Some of the issues were due to my noviate status in none-IVI/SCPI instrument programming. Otherwise, the solutions provided by the members of this forum were on track. The attached VI represents my final solution to the problem. No CRLF are required on Xmit or Rcv.