LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communicating with serial port(reading from SIM card,Basic Serial Write and Read.vi is enough?)

Hi All,
 
I am using the Basic Serial Write and Read.vi to fetch and write data to SIM card.
 
If iam doing both ,that is writing then reading then its ok.
 
But if i am seperating the two that is one vi to write and another vi to read then the vi to read the data is not reading(its showing the bytes at serial port as 0).
 
I havent used serial communication before.As we are writing to the SIM card,the phone number also has to be supplied?
Or the VI  Basic Serial Write and Read is enough for my purpose also?
 
The SIM card is plugged to the serial port of my PC and from the same PC iam running the vi.
 
Pls give me some suggestions.
 
(Actually my part is only to read data from SIM card .writing data to SIM is done by anopther application.
But as now i am working independendly,i am developing vis and testing it in my pc in which a SIM card is attache to the serial port.
The SIM should have some data.Thats why i tried to make 2 modules one to write and the other to read.So i can check the vi can read)
0 Kudos
Message 1 of 5
(4,763 Views)
Without posting your code, it's going to be hard to tell you what's wrong.  Have you made sure there are no errors occuring?  If you are trying to seperate the process, you still only open the COM port once and then you should be able to write and read.

One thing that concerns me is that another application is going to write to the SIM card.  Is this program LabVIEW based?  I ask because you will not be able to open another connection to the COM port.  Only one application can open the port at a time.  So, if you have a program that is an entire seperate entity, you're not going to be able to open the COM port in yours.  If someone else is writing LabVIEW code to send the data messages, then you need to integrate your code into theirs.

Matthew
Message 2 of 5
(4,758 Views)

THANK U SO MUCH FOR UR REPLY.

I am herewith attaching my VI which i have used to read from serial device.

Now i am working with the module independendly.So just i have to make the vi work so that it can read from serial device.

The SIM card got data also.But stll the bytes at port is showing to be 0.

I have tried by enabling terminal character to T and F.But both not working.

Please guide me regarding this.

 

Message Edited by user_1 on 09-03-2007 01:24 AM

0 Kudos
Message 3 of 5
(4,750 Views)
If you have a similar write VI, then your problem is that you are trying to open the COM port twice (once in the write VI, and once in the read VI).  You have to open the COM port once and then write and read with the VISA reference.  My guess is that you aren't doing that.  You can't open the port twice.
Message 4 of 5
(4,725 Views)
Hi,

I guess your SIM card is inserted into some device that you can write to or
read from. Usually you would first write a command to your serial device and
then read its response. Either try to find that command or find out what and
how much you can read after "writing" to the SIM card.

Bart Boshuizen


Message 5 of 5
(4,715 Views)