08-29-2023 03:15 PM
Hello all,
I'm coming to the forums because I feel like I've tried everything else already. I want to control an AE paramount rf generator unit through a serial port. However, I can't quite make it work. Essentially, I want to send the following binary signal ( 000010000000001000001010 ), which should be valid according to the below structure and the commands in the manual.
However, I get the timeout error : VISA: (Hex 0xBFFF0015) Timeout expired before operation completed. So I believe either
1) my configurations are incorrect.
(From manual)
(Sample configurations, I've tried many)
2) I'm not handling the handshaking correctly. However, I can't read anything thats being sent back due to the timeout error. Handshaking according to manual:
3) My final thought is that I'm not sure how to handle the 'start bit' the manual references, as VISA gives no option for that.
Can anyone offer any insight into my problems? It would be greatly appreciated. I'm very new to using National Instruments.
Solved! Go to Solution.
08-30-2023 06:30 AM
08-30-2023 07:46 AM
I actually haven't tried to do anything with labview yet. Thats the next step. However I'm unable to send test commands through NI-VISA.
Do you believe I would have more success with a Labview VI than with sending commands through VISA?
08-30-2023 08:03 AM
Sure, because you need a handshake with ack and that is doable in LabVIEW easier than in MAX.
Open the visa session, send the bytes (in a string) read one character etc.
In LabVIEW make sure that all vi's that have an error-in/error-out are connected.
That is the way to make sure that no parallel actions happen.
And I can make an example, but which version of LabVIEW do you have?
08-30-2023 08:15 AM
I'm using Labview 2016 at the moment. I really appreciate your assistance.
I'm not really sure how handshaking works, but I I'm unable to use the 'read' function in VISA at all to read anything the device is sending back. I mention this in case you believe that will be an issue for the Labview VI.
08-30-2023 08:42 AM
08-30-2023 11:49 AM
I believe I have not.
The reason I think this is that I can actually control the generator already using the software that comes with the machine, through that very same cable/serial port. I need to control it with labview for my experiments, though. However, I am not quite sure what crossing the pins/wires would look like. This was a standard, pre-purchased wire. And the 9-pin serial connector can only fit one way.
08-30-2023 12:20 PM
09-05-2023 08:55 AM - edited 09-05-2023 08:57 AM
So, I've been reading a ton of the forums. I've done some testing around in labview with the below VI, however I've yet to receive any signal back from the machine. Not even an 'unknown command' signal. My approach is very basic, as I still don't grasp the overall concepts involved. I'm trying to send the basic hex command '08020a' to tell the machine to start outputting power.
Unfortunately I'm still not sending the correct commands. I'm worried I'm not correctly handling this 'start bit' and 'end bit' that the manual says should be there. Labview says it handles the end bit, but I don't understand how. Similar question: should there be h's appended to the end of the commands I'm sending, or is that just there in the handshaking diagram (in first post) to indicate that these are hex numbers?
One important thing I noticed is that the machine is little endian, while labview is big endian. However, if I understand correctly all this means is that I should reverse the order of the hex bytes I send. I've had no success with that, either.
I've attached a 4 page version of the communication protocol with the unit. I'm still hopeful that this is a simple problem that won't take too much of anyone's time to solve.
09-05-2023 10:11 AM - edited 09-05-2023 10:12 AM
I cleaned up your VI some. The main issue I saw was your display mode for the strings. The device is using a Binary protocol, so you want all of your strings to display in Hex. Also, make sure the Termination Character is turned off (Boolean on the top of the VISA Configure Serial Port). After that, it is a matter of following the framing protocol. The below example is based on the example in the document. You will need to alter things depending on the message you are trying to implement.