LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read datas from table

Solved!
Go to solution

Hi,

     what Iam trying to do is in the attached VI.

     Sending data from one VI and receiving it in another VI.My question is:-

       1)Can it be done using serial port reading??Assuming "data sender" as an external device and reading and displaying them in receiver.

       2)As I have no hardware and the only available thing is a null modem cable,to connect between two ports,is it possible using VISA read and write??

       3)Is there any methods otherthan VISA to be used here??

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
Download All
0 Kudos
Message 31 of 189
(1,012 Views)

Hi Danil,

 

1) How can you send values from one VI to an other, when your data source is an "external device"? Did I mention you have to write better questions?

2) it's possible

3) VISA is to be used for serial port communication...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 32 of 189
(1,010 Views)

Sorry we can continue here.....

 

"Assuming "data sender" as an external device"

Because no actual device to send data.Just assume that "data send" acts as a device that sends data.

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 33 of 189
(1,008 Views)

Hi Danil,

 

all this has been answered before. Is there any new aspect?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 34 of 189
(1,001 Views)

Hi Gerd,

 

             Yes,we have already discussed.But Iam still struggling with it.I just want to ask you one thing:-Is it possible to send array elements from model write.vi and display it in model read.vi using VISA read and write?If yes how can we connect them?For communication between two VIs we know queues and some other functions are there.But I just want to did it using Visa read and write.Please give possible suggestions.model write.vi and model read.vi are attached below.

 

 

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
Download All
0 Kudos
Message 35 of 189
(986 Views)

Hi Danil,

 

yes, it's possible.

You need to use two COM ports, connect them with a proper cable, and that's it...

 

In the "Read" routine I would not limit to read just 2 chars, especially when you want to send U32 values as noted in your other thread. You already configured your VISAInit to use the TermChar, so you don't need to limit the VISARead function...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 36 of 189
(983 Views)

OK.

               1)It means we have to wire the byte count with exactly the number of bytes that we are sending??

               2)After wiring the two COM ports togather,Is VISA read can read from the array in model write.vi??

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 37 of 189
(980 Views)

Hi danil,

 

"1)It means we have to wire the byte count with exactly the number of bytes that we are sending??"

No, it means you have to wire a number greater than the expected number of bytes. You use the TermChar to signal the EndOfString!

VISARead stops in 3 cases:

- number of bytes to read is received

- TermChar is received

- TimeOut

You want to use case 2...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 38 of 189
(978 Views)

OK.thanks for explaining.What about this one

 

After wiring the two COM ports togather,Is VISA read can read from the array in model write.vi??I mean,In queue we have queue reference...anything like that?

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 39 of 189
(976 Views)

Hi Danil,

 

I don't get the connection between COM ports and their VISA "name" and queue references.

 

But anyway:

Yes, your Reader should be able to receive the values sent by your Writer vi...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 40 of 189
(972 Views)