LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

K&L LabVIEW programming

Solved!
Go to solution

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!

0 Kudos
Message 1 of 10
(3,950 Views)
Solution
Accepted by topic author RT1956

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.

Message 2 of 10
(3,942 Views)

It sounds like you need something like this.  Of course, I am assuming a serial port is used for communications.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 10
(3,933 Views)

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!

0 Kudos
Message 4 of 10
(3,914 Views)
Please attach the manual that you do have. Please attach an image of your block diagram. Create a snippet.
Message 5 of 10
(3,889 Views)

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!

0 Kudos
Message 6 of 10
(3,872 Views)

BMP of the command attempted.

0 Kudos
Message 7 of 10
(3,865 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 8 of 10
(3,829 Views)

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!

0 Kudos
Message 9 of 10
(3,796 Views)
Solution
Accepted by topic author RT1956

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.

0 Kudos
Message 10 of 10
(3,652 Views)