10-28-2010 05:00 PM
Hello;
Along to this question; I used Visa Configure Serial Port, I need two of them. Is there any way to have two of this for two different port numbers?
When I add another one, changeing in any of them make changes to another one too. For example when I change Buad rate for one of t hem to 38400 another one also auomatically changed too!
Thanks
10-28-2010 07:28 PM - edited 10-28-2010 07:31 PM
You can use two of them. It only affects the whichever port you defined on the purple VISA wire going in. So , for example Com 1, if you need a baud rate of 38400, wire upt that constant to the Configure port VI. For your com2 if you need 9600, it is a different purple wire going into that copy of the subVI, wire a constant of 9600.
10-28-2010 07:41 PM
Thanks for your respond.
I created it. I don't have my device ready to test it. But seems it works good, at least for one of my port which is ready and another is blank.
If I face to further problem, ask again:).
Thanks;
Sb
10-29-2010 01:48 AM
Things to think of regarding RS232 that i've bummed out on several times:
Remember to open and close the Visa port
Use a port that exists (doh) (especially if using usb->serial where the com port might change)
Set the communication parameters correctly before communicating
Standard simple things that can cause hours of debugging.
Else it's a string read from port that you need to handle appropriatly, no different from reading from a file.
/Y
10-29-2010 01:45 PM
Actually; The front panel shows me different port number (imagine that I use the same baud rate from different ports).
When I double click on the VIsa Serial in block diagram I see the same info for both of them, both the same port number.
I set up my devices, and just one of the port works, another one has problem.
10-29-2010 02:35 PM
You are wiring the same baud rate control into both Serial Init VI's.
If you want them to be different baud rates, you have to wire different numbers into them.
It doesn't matter what the subVI shows when you double click on it, that only matters if you don't have a value wired into the connector pane.
And for the values of the VISA controls, you do have two separate controls, but their default values are the same Com1 port. Are you changing one of them before you run your VI?
10-29-2010 02:54 PM
I want to have the same baud rate. BUt reading from different COm port. On the front control, I did change the COMp port. I set one for COM 1 another COM 4.
But when it starts receiving data, one of them become red (means error).
DO you think any wrong on this diagram?
Thanks
10-29-2010 03:07 PM
Okay. I thought you wanted to different baud rates based on what you said back in message #11.
If you get an error, what does it say? Do you have an error number?
10-29-2010 04:34 PM
I am in Highlighted Execution (The Lamp).
I see that one of the port doesn't send the data. I just receive the time (Not coming from the COM port)!
Thanks for your help.
10-29-2010 11:14 PM
So, you have no error indicator - bad design. If you had, you could right click on it to get an explanation. You can also go to Help>Explain Error.
The error is VISA: (Hex 0xBFFF0072) The resource is valid, but VISA cannot currently access it.
Do you have another program using that port?