AnsweredAssumed Answered

vrf Fw: Streaming Serial Data Capture Working

Question asked by tdaniels on May 3, 2004




Thanks VRF,

I used Reiner's idea of the DAV object, as a start.  Then I found that I
needed to reset power to the device while the DAV was waiting, so I used a
direct I/O box to reset power to the device.  I ran this off the bottom
flow connection of the DAV.  After that I could see data coming in, but
only one line at a time through a direct I/O read attached to the event
connection of the DAV.  So I looped on the direct I/O read for a specific
length of time, while using Shawn C's idea of monitoring the port with a
bus I/O Monitor attached to the DAV event pin, as well.  And presto...I can
read the streaming data that I needed.

Maybe there is an easier way, but I'm happy that I can get the data without
using a second program like Hyperterminal.

Thanks All,
Tom

.    .  So I looped


                                                                          
             "Schlieker,                                                  
             Reiner"                                                      
             <reiner.schlieker                                          To
             @siemens.com>             VRF <vrf@agilent.com>              
                                                                        cc
             05/04/04 11:21 AM                                            
                                                                   Subject
                                       [vrf] RE: Fw: Streaming Serial Data
             Please respond to         Capture                            
                "Schlieker,                                               
                  Reiner"                                                 
             <reiner.schlieker                                            
               @siemens.com>                                              
                                                                          
                                                                          




Have you tried the DAV (Data Available) object?  You could read the data
and
discard it, and then use the DAV to wait until there is data in the buffer.
You can even wait until a required number of bytes is in the buffer if you
set it to no wait and put it in a test loop, as it outputs the number of
bytes available.  You would then read that specific number of bytes, which
should stop the timeout errors.

Reiner

-----Original Message-----
From: TDaniels@moreycorp.com [mailto:TDaniels@moreycorp.com]
Sent: Tuesday, May 04, 2004 12:13 PM
To: VRF
Subject: [vrf] RE: Fw: Streaming Serial Data Capture






Best Regards,

Sorry if my first post wasn't clear.  My normal methods were not working,
so I was just fishing for a different way to get the data.

I cleared up the SICL errors, and am now having a little success
communicating with the device.  If I disrupt the data stream by sending a
command (like putting the device into debug mode), then I can read back,
through direct I/O, that the device entered debug mode.  What I can't
figure out is how to start reading the data in mid stream without sending a
query to the device first (Normal Operating Mode).  When I try I get serial
port errors.  "I/O error or timeout occurred with serial interface".

,Tom




             "Schlieker,
             Reiner"
             <reiner.schlieker                                          To
             @siemens.com>             VRF <vrf@agilent.com>
                                                                        cc
             05/04/04 10:43 AM
                                                                   Subject
                                       [vrf] RE: Fw: Streaming Serial Data
             Please respond to         Capture
                "Schlieker,
                  Reiner"
             <reiner.schlieker
               @siemens.com>






Ah, I see.  It wasn't clear from your initial email that you'd tried the
more normal route already.  I'd take Bruno's advice, and others posted
recently, such as resetting the port, and reading and discarding data to
clear the buffer, before reading the data that you're looking for.  VEE
does
indeed grab the port and won't let go.  Also, I've seen these SICL errors
when disconnecting and reconnecting, or cycling the power on a serial
device
- it seems that garbage on the port causes them.  In the end, if VEE can't
get you there, then many have recommended that you use a third party
approach (ActiveX serial control), though I've never had to resort to that.

Reiner


-----Original Message-----
From: TDaniels@moreycorp.com [mailto:TDaniels@moreycorp.com]
Sent: Tuesday, May 04, 2004 10:31 AM
To: VRF
Subject: [vrf] RE: Fw: Streaming Serial Data Capture






Reiner,

I have the books...and have looked through them.  I did set up the serial
port with the IO libraries.  I did ad an instrument with the instrument
manager.  I did set the correct baud rate, etc.  I did try to use direct
I/O to read the data, but receive SICL errors (It says the port is already
in use by another process) when I do it.  I tried most all of the Direct
I/O read types, but have not had any success with them (BRB).

I have used serial ports on a number of other devices in the past
successfully, but am having a problem with this particular device.  It is
an Orbcomm satellite link, that starts spitting data out to the serial port
as soon as it is powered up.  Usually in direct I/O, I query a device to
return specific information.  Since this case is different, I thought there
might be a different approach.  I am also looking at the I/O bus monitor,
as suggested by Shawn C., but am not having success there either.





             "Schlieker,
             Reiner"
             <reiner.schlieker                                          To
             @siemens.com>             VRF <vrf@agilent.com>
                                                                        cc
             05/04/04 08:58 AM
                                                                   Subject
                                       [vrf] RE: Fw: Streaming Serial Data
             Please respond to         Capture
                "Schlieker,
                  Reiner"
             <reiner.schlieker
               @siemens.com>






This is one of the most basic functions of VEE - you should look through
the
help or the books to figure out how to do this.

Basically, you set up the serial port with the I/O libraries.  Then, you
add
a serial instrument using the instrument manager.  You set the properties
of
the instrument to the correct baud rate, etc.  Then, you use a Direct I/O
Object, with a READ TEXT STRING transaction, to read the data.  If your
data
has delimeters then you could read it in as a 1D array, which would help
you
parse the data if required.

Reiner


-----Original Message-----
From: TDaniels@moreycorp.com [mailto:TDaniels@moreycorp.com]
Sent: Tuesday, May 04, 2004 9:36 AM
To: VRF
Subject: [vrf] Fw: Streaming Serial Data Capture






Hi All,

I posted this message yesterday, but did not get any responses.  Does
anyone have an idea to point me in the right direction?  I thought VEE
might have a one box object that could capture the data stream without
using hyperterminal?  Two boxes?   : - )


----- Forwarded by Thomas E Daniels/The Morey Corporation on 05/04/04 08:34
AM -----

             Thomas E
             Daniels/The Morey
             Corporation                                                To
                                       vrf@agilent.com
             05/03/04 10:50 AM                                          cc

                                                                   Subject
                                       Streaming Serial Data Capture









Hi VRF,

I am trying to capture alpha numeric data that is streaming into a serial
port on my PC.  I would like to capture this data between known starting
and ending points, then grab specific information contained within the
capture.  I can do this by running Hyperterminal as a PC Execute within
Vee...Writing the Hyperterminal Data to a txt file of the HDD...Then
reading the text file back into VEE...but it seems like the hard way to do
it.  Is there an easier way to get this information into VEE?  The data
that I am capturing is listed below in bold and repeats continuously,
although I only need to capture one pass of information.

I am using VEE 7.0 on an XP machine.

EnabPort 1 initialized
Inflating...Done
Init MTS PORT to Serial Device
HW watchdog initialized to reset on 30 sec timeout, successfully.

Adding 2586 symbols for standalone.
rtc_ioctl(SET_RTC_ALARM): Rounding Secs val to next minute
  WeekDay Alarm: Disabled at Sunday
  Day Alarm:     Enabled at 01
  Hour Alarm:    Enabled at 12
  Minute Alarm:  Enabled at 52
Current Time: 01Jul03 00:51:08
/tffs1 (upper FLASH) initialized OK
desired_gwy_id: 43
/tffs0/ANA_CAL.NVM unavailable
SER_boSerialInitOk
NVM_vdRestoreMsnFromNVM: fsize 24
Reading 1 MSN LL elements from NVM
MSN LL[0] Gwy 43 SCT: Msg 0 645710348 Gg 0 649627148 SCO: Msg 1 Gg 1 Rpt 1
J1708_retrieve_structs
dspInit: dsp_get_synthError_from_flash
Starting End-of-Line test.
Gateway = 1
DL channel = 271
Change channel number; recalculate Fletcher
SYNC: 0 0x65
SYNC: 1 0xa8
SYNC: 2 0xf9
SYNC: 3 0x01
SYNC: 4 0x10
SYNC: 5 0x0f
SYNC: 6 0x01
SYNC: 7 0x00
SYNC: 8 0x00
SYNC: 9 0x00
  2 0x1d GWY INFO: 0x01 00 00 00 00 00 00 00
Set GWY ID to 1; recalculate Fletcher
DL_CHN_INFO:
UL_CHN_INFO:
EPH:

Sent DL Frame: channel 271, gateway 1, synthError 0
>>>>Init DIO for RELAYS<<<<
RELAY_NVM
Set D7 as output.
RTC expected

>>>Turning on sepic...





Best Regards,

Tom Daniels
Test Engineer
The Morey Corporation
100 Morey Drive
Woodridge, IL 60517
T: (630) 754-2256
F: (630) 754-2656
tdaniels@moreycorp.com


---
You are currently subscribed to vrf as: reiner.schlieker@siemens.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".

---
You are currently subscribed to vrf as: TDaniels@moreycorp.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".




---
You are currently subscribed to vrf as: reiner.schlieker@siemens.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".

---
You are currently subscribed to vrf as: TDaniels@moreycorp.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".




---
You are currently subscribed to vrf as: reiner.schlieker@siemens.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".

---
You are currently subscribed to vrf as: TDaniels@moreycorp.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".




---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes