Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA + Serial Communication - Help Needed !!!!

Solved!
Go to solution

Hi everyone,

 

I've got a lot of help regarding my project from this board and I am looking for more :). Thanks for taking the time to help. Please bear with my as I am asking a LOT of questions.

 

I intend to control a frequency converter by using its serial terminals and sending commands from my PC + LabVIEW to it. The commands do basic functions like, start, stop, speed up/down etc etc. I will be using a USB to Serial converter to transfer data. 

 

Now, I ve played around with the examples like SERIAL COMMUNICATION VI and such and I am beginning to understand how VISA works. 

 

Q1. In order for LabVIEW + VISA together to communicate with my frequency Converter, do I need to install some sort of a driver for it to recognise it ? The frequency controller is ages old, even I am not sure and I dont think I can find a driver for it anytime soon ? What sort of a driver am I looking for ? Is it possible to customise my own driver and would that be easy ?

 

attachment included - process.jpg

 

I have uploaded a couple of pictures regarding data format issues. I need to send information to the converter using the "telegram format" as depicted in the image below. Each 'function' in the 'telegram format' has varied byte length - some have 1 others have 2, others have 4.........

 

I have also uploaded an image called 'Format.jpg' which tells what information each of these 'Functions' will contain. Note: - the frequency converter only uses the last 4 bits.

 

Say for example, 

 

The START function will need this bit of information - 

 

Start Byte - ASCII '59'

Address - 00

Control Character - ??? I am not sure what this should be as I need to operate the converter based on parameter values - getting confused on what to choose - C, U, I or R. Start, stop etc have their own specific paramter values like 402, 404 resp, so I assume I want to update(U) ???

Control Status Word - ??? depends upon the previous action

Sign - not needed

Data - 0

Comma - not needed

check sum - not needed

Stop Byte - ' > ' (ASCII:62)

 

Phew.....How would I go about clubbing this entire format together to send ONE command signal ??? Would putting all these information in an array help somehow ??

 

Please help me...need to get this done desperately...

 

Thanks,

 

Sandeep

 

 

 

Download All
0 Kudos
Message 1 of 5
(4,166 Views)
Solution
Accepted by Sandeep_k

It would help if you could find a driver but it's not absolutely necessary to have one. You can write your own, use the Instrument I/O Assistant, or use discrete VISA Writes and Reads.

 

The format of the commands is a bit complicated but not impossible. You just need to be careful to have the correct number of bytes.

 

What I don't see in the atttachments is the possible control and status words and the parameter numbers. I would hope that these are in a different part of the manual.

 

An example (without the control and parameters) bytes to update the frequency to 12.34 might be '<00U________+123403??>'

0 Kudos
Message 2 of 5
(4,130 Views)

HI Dennis,

 

Thanks for the reply.I have htought against aDB9converter and will go with just a serial cable instead. This way I dont think I need a driver anymore and can directly connect the PC to the frequency converter.

 

I have attached a couple of pics of what you were looking for[ control/status words]. As for the parameter values, they are always 3 digit numbers, like 203, 402 etc etc. I still havent figured out how to use these control/status words.

 

Note: I found out that all bytes in the telegram format should be filled even if not needed or else the frequency converter may not be able to decifer the ASCII format being sent.

 

One of my concerns is how to send it all as ONE signal in LabVIEW along with VISA ? Do I simply put it in a string or is there an ASCII function in LabVIEW that I can use for this purpose ?

 

 

Download All
0 Kudos
Message 3 of 5
(4,109 Views)
You put it in one string just like my example. You would obviously replace the '_' I used with the correct values. The string is ASCII so I don't understand your comment at all.
0 Kudos
Message 4 of 5
(4,104 Views)
Thanks Dennis.
0 Kudos
Message 5 of 5
(4,098 Views)