LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication between Controller and Labview through RS-232

I tried changing it to Index Array and finally got a value out of it. However, I am unable to clarify if this is the information because I am doing a testing on a virtual port. The purpose of the combo box is so that the user can select which indexed array he/she wants to see.

(Because I have a few information such as Voltage 1, Voltage 2 ....)

I know I am a bit confusing but I hope you get what I am trying to say.

 

Is this the right way to connect up the block diagram? Please advice.

0 Kudos
Message 11 of 17
(1,194 Views)

Anyway, here is an attached of my program. I am really lost at the moment. Any help is deeply appreciated 😞

0 Kudos
Message 12 of 17
(1,190 Views)

So is it now working a bit better than it was before?

 

Before you had 3000, and 20 in your input cluster.  If you want 40000 to 40009, then it should be 0 and 9.  Your latest VI shows 0 and 8.

 

I don't know what a Virtual Com port has to do with it.  Virtual or physical, LabVIEW and VISA do not care.  It is either working or its not.  You now say you are getting a value out of it.

 

Other than the 0 and 8 in that cluster should be 0 and 9, I don't see an obvious issue with your code.  So if you are still having problems, please be explicit as to what it is actually doing, and how it is wrong.

Message 13 of 17
(1,178 Views)

Hi Raven,

 

I am able to run the program now. The reason why i created a virtual port is so that I can test this program on my laptop before bringing it to the test ground. 

 

Perhaps, I am creating the virtual port wrongly. But right now, Whenever i extract information, I can only get a "0" which makes me wonder if my program is running the way it should be. Do you have any idea how to create a virtual port that acts as a slave and is able to send out U16 data?

0 Kudos
Message 14 of 17
(1,162 Views)

One more thing, Raven. As of now, I think the whole program is fine except for one last thing. It keeps appearing an error under my MB Serial Master Query that I have attached below. What do you think is the problem?

 

Cheers mate. 

0 Kudos
Message 15 of 17
(1,153 Views)

Use Help >>  Explain Error to read more about that error message.

 

It says "The given session or object reference is invalid".

 

That means something happened to your VISA reference.  Possibly you lost the reference value, such as an unwired tunnel.  Or maybe it is the use of a "virtual port" that is not being recognized as valid.

 

Search your code for unwired tunnels.  Try your code on the real devices and see if it still happens.

Message 16 of 17
(1,132 Views)

Hey Raven, 

 

Thanks for your amazing feedback. I will test it on a real device probably next week and get back to you. Hopefully to bring you good news.

 

Thanks for all the help that you have provided me throughout this entire process.

Appreciate it and may god bless you. 

 

Cheers.

Message 17 of 17
(1,124 Views)