09-12-2011 07:58 PM
Hello everyone,
I'm having a bit of trouble with the Uniblitz TMM-V1. I'm using an RS232 in order to communicate with the Uniblitz Instrument, but it doesn't appear to be doing anything. I tried a loopback test in order to test whether or not the problem was with the computer or with the cable, but the loopback test was in fact succesful.
One thing that I'm particularly unsure about is what type of format the VISA write process accepts? Is it hexadecimal, binary, ASCII? I'm asking because there are many formats accepted by the Uniblitz TMM-V1, but I'm not entirely sure which the VISA write is processing. Another question would be, is the "\n" termination character required for all VISA write functions?
Sort of frustrated with the process, and this is a great community. I would appreciate any and all ideas that you can give me with regards to this little predicament in which I find myself.
09-13-2011 08:37 AM
VISA Write accepts a series of characters as a string. That's it. it's not ASCII, hexadecimal, binary, or anything else. It's a series of bytes, where the individual bytes are just values. If your device uses a simple human-readable messaging protocol, then the individual bytes would be individual characters such as "SOURce:VOLTage:13.5". If your device requires a series of bytes where the bytes refer to commands, such as a byte value of decimal 10 refers to setting the voltage, and then a 32-bit value being the voltage, then you'd create the series of bytes that way. Usually when you have an instrument that uses this "register-based" or byte-command-based programming it's easier to create a U8 array that is your command sequence and then use the Byte Array to String function to connect to the VISA Write function.
As for the "\n" question, that is not required for all VISA Write functions. Whether or not it's needed it completely dependent on the instrument's programming interface. Do you have the programming manual for your instrument?
09-13-2011 08:41 AM
Hello smercurio_fc, that was very helpful and prompt, thank you!
Although I'm aware that VISA just writes something as a string, I was curious as to how the Uniblitz would interpret the commands. But it appears as though the Shutter Controller interprets the string commands as an ASCII format, so it's best to write it in that sequence. I also figured out that you do not require the \n termination char for the Uniblitz controller.
Apparently the problem was with the RS232 cable. You need a specific type of cable with crossovers between pins 2 and 3 in order for it to work properly. I have finally got it operating!
Thank you for your help.