LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending files to serial port


morngoose wrote:

Hi, sorry about the mixed threads...got a bit carried away.

 

Ok, so you've seen my send loop. And as I said, this works 100%, but on bigger files, it does not.

 

Sending a small file (up to 6k bytes), the modem immediately replies with OK if successfull (I've got a looped delay code which waits until bytes is received at the port before reading it)

 

Sending a larger file, once sending is completed, I read the port, and the ERROR is received. 

 

I've matched the bytes send output from VISA Send with the file size, and that is identical, so all bytes seems to be transmitted.

 

Why I get an Error reply I have no idea, I can only suspect port buffers or perhaps something like escape characters being sent down incorrectly - but then again, this is not a problem with small files.

 

desperate


Again for the nth time. What error are you getting? I completely understand what you are seeing. You don't need to repeat that over and over. I can't provide any more help if you don't tell me what the EXACT error that you are receiving is.

 

Does your modem require a specific communication protocol for receiving data? Are you getting a timeout error? Is it on the write or the read?



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 11 of 14
(674 Views)

It is not a labview error, please dont get confused.

 

After sending the file to the modem , the modem either replies OK or ERROR. (not labview)

 

 

0 Kudos
Message 12 of 14
(672 Views)

morngoose wrote:

It is not a labview error, please dont get confused.

 

After sending the file to the modem , the modem either replies OK or ERROR. (not labview)

 

 


Then I suggest that you look at teh modem reference. I suspect that it is expecting a particular messaging protocol for transferring the data and simply writing the data out is not sufficient. Have you check to make sure you are not appending line terminators or extra data to your stream? Is the modem expecting flow control of some sort?



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 13 of 14
(670 Views)

My guess is that with larger files, you are flooding the modem's buffer.

 

Is this an internal modem or an external modem connected by a serial cable?  Read the specifications on the modem.  Do you need to use any kind of hardware flow control?  (OK, Mark already said these last two.)

 

What is the modem connected to?  Is it another modem over a phone line?  Do you have to deal with dialing commands and AT modem commands and stuff like that?

0 Kudos
Message 14 of 14
(656 Views)