Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




VBA To Collect Data Over Ethernet


I have a ZWorld Rabbit processor connected to some analog sensors. It has an ethernet RJ-45 connection. I want a simple application that I can use to collect data from this unit and display the numbers, hopefully as fast as 10 times per second.

Idealy, I am thinking of two test programs, one to send some data up to 10 times a second (maybe just a counter to start with, them make it six counters) out on my LAN and the other to receive the data from the LAN and display the latest value(s) on the screen. Once I get the PC part of this sending and accepting data, I will start working on the Rabbit end to send the data instead.

What is the easiest way to reliably do this? I am running Windows XP and have a hub connecting two computers and the Rabbit device. Simple is best. Is there some example code that is close to this that I can morph into what I need?

Thanks for your time,
Bkelly




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Collect Data From An SQL Statement.
I have an Access Database which i am accessing though VBA...

What i want to find is the client_reference_number which corresponds to a phonenumber. The below code is the SQL which outputs one and only one number a five digits long id.

Code:
SELECT DISTINCT (SimCard_Details.Client_Reference_Number) AS Expr1
FROM SimCard_Details
WHERE (((SimCard_Details.IMSI_Number)="?????????") AND ((SimCard_Details.Active)=Yes));
' ????????? is actually a variable called IMSI (15 characters long)

What i want is for this id to be placed into a field called CRN. Then it can be inserted using the following code:

Code:
'------

    Dim dbs As Database
    Set dbs = OpenDatabase("C:Human DigitalDatabaseFastwaveDB.mdb")
    
'    I WANT THE ANSWER TO BE PLACED IN HERE SO I CAN DO THE NEXT SQL STATEMENT.

        dbs.Execute "INSERT INTO Voice_Data_SMS " _
            & "(Client_Reference_Number, IMSI, IMEI, Phone_Number_Called, Start_Call_Time, Charged_U, Charge_To_Fastwave, Location_Code) VALUES " _
            & "('" & CRN & "', '" & IMSI & "', '" & IMEI & "', '" & PhoneNo & "', '" & FullFull & "', '" & ChargeUnit & "', '" & CostFull & "', '" & LocationCode & "');"
        dbs.Close

'------

ANY Ideas,

Thanks
PAID THE UMPIRE
-- Merry Xmas

Collect Event Viewer Data
I recently decided to start making a program that tweaks/fixes computers based on the event viewer errors and maybe the registry. Does anyone know a way to get the errors in the event viewer in, both, the application section and the system section? Thanks

Variables => Collect Data To FTP? *** NOT RESOLVED ***
I am currently collecting statistical data from my program. The program asks the user their first name, and birth date. I would like the data to then be uploaded to my FTP server. I want the program to check for the previous text files already allocated on the FTP server and increase the numerical value by one to the file name so I can have numbered file lists.
Eg:
data1.txt
data2.txt
data3.txt

If not, How could I go about this approaching differently?
Thanks for your help

Collect Data From A Pabx Machine
I want to collect call information from a panasonic digital super hybrid system using vb. How can i cannect the computer to this machine and collect data.

Machine model is KX TD1232.

Thanks for help.

Collect Data From 3 Digital Indicator.
Hai, guys. I got this project on hand. Here is my problem: i got 3 digital indicator that will measure a product height. This 3 digital indicator will do the measurement and send out the measured data thru RS232 connection cable to the PC serial port (RS232) port. The PC will receive the three data and save it in the from like in the MS exel spreadsheets or store in database like access. The stored data will be use for printing or plot graph. Do u guys got any application similar to what i want. Please link me to any available website. Thanks And Have Nice Day.

ACCESS: Collect Data From Field In Report
Hi!

I am trying to get a data field from a report to be able to make a loop and copy files with the same name as the data field I am trying to retreive.

My problem is that I can not retreive the data. The error message is.
"Can not find the field 'Component_number' refered to in your expression"


Code:
Private Sub Command46_Click()
On Error GoTo Err_Command46_Click

Dim stCreateCutsheetDirectory As String
Dim stCreateCutsheetDirectoryQuoteID As String
Dim stCreateCutsheetDirectoryJobName As String
Dim SourceFile As String
Dim DestinationFile As String
Dim stringPN As String

Me.[Quote_ID_hidden] = Me![CREATE ORDER subform]![Quote_ID]
Me.[Job_name_hidden] = Me![CREATE ORDER subform]![Job_name]

stCreateCutsheetDirectoryQuoteID = Me![Quote_ID_hidden]
stCreateCutsheetDirectoryJobName = Me![Job_name_hidden]

stCreateCutsheetDirectory = stCreateCutsheetDirectoryQuoteID & ", " & stCreateCutsheetDirectoryJobName

MkDir ("C:Documents and Settingsycitroncutsheets" & stCreateCutsheetDirectory)

SourceFile = "C:Documents and Settingsycitroncutsheets" & "1400000492770.pdf"
DestinationFile = "C:Documents and Settingsycitroncutsheets" & stCreateCutsheetDirectory & "" & "1400000492770.pdf"

stringPN = "hej"

Do While stringPN <> vbNullString
stringPN = Reports![CREATE ORDER report]![Component_number]
SourceFile = "C:Documents and Settingsycitroncutsheets" & Me.[Component_number] & ".pdf"
DestinationFile = "C:Documents and Settingsycitroncutsheets" & stCreateCutsheetDirectory & Me.[Component_number] & ".pdf"
FileCopy SourceFile, DestinationFile
Loop


DoCmd.RunCommand acCmdRefresh

Exit_Command46_Click:
Exit Sub

Err_Command46_Click:
MsgBox Err.Description
Resume Exit_Command46_Click

End Sub

Please help!!
Thanks,

Collect Data From Excel - Text File
Hello All,

Thnaks in Advance

I need one help put the data from Excel to the Text file.

Here goes my requirement.

Below is the format of the data in excel would be.


Table1 PK1 Col2 Col3 Col4 Col5
-------- pk1_1 12 "Letter" 10 "Active"
-------- pk1_2 11 "Phone" 10 "Active"

Table2 PK2 Col2 Col3
-------- pk2_1 "H1044" "01-01-2007"

The output I’m looking is.

Table1.PK1 = pk1_1
Table1.PK1 = pk1_2

Table1.col2 = 12
Table1.col2 = 11

Table1.col3 = “Letter”
Table1.col3 = “Phone”

Table1.col4 = 10
Table1.col4 = 10

Table1.col5 = “Active”
Table1.col5 = “Active”

Table2.PK2 = pk2_1
Table2.col2 = "H1044"
Table2.col3 = "01-01-2007"


Hope got the things what I’m looking for.

Please do let me know in case any of you know how to write the code in VB macros for the same.

Regards

Danny

How To Collect The Data From A Listbox To A Datacontrol Or To A Recordset?
Hi Friends,
I have a list box, which is containing about 20 lines. in my application there is no database. But i need to collect this data from the list to a record set (to pass the records to trueDBList control). how I can do this matter.
Plz help me
C.P.Usman

Need To Collect Data From Selected Rows In MSFlexGrid Row Collection
I have a collection that counts the number of rows selected in an MSFlexgrid. How do I pull/collect data from the rows selected within the collection to populate labels on another form? I was thinking I can do something with the code below:

Dim r As Variant
For each r in m_RowSelected
If MSFlexGrid1.TextMatrix(r, 0) = strChecked Then
'have variables to hold data of selected rows
End If
Next r

I'm not sure how to hold the data within the selected rows in a variable to populate onto another form.

Any suggestions?

HHHHEEELLLPPP!!!! (Connect An Access Database To A HTML Form To Collect Data)
HHHHHEEEEEEELLLLPPPPPP!!!!!!

Does any one know how to connect an access 2000 database to an html page? I have the html page and database created but I can't seem to get the page to transmit the data to the database. If anyone has any simple project or sample code available I would appreciate it. I've been at this for a week and still can't get it to work. PPPLLLEEEEAAAASSSEEE HHHHHEEEELLLPPP! Thanks.

Get Ethernet ID
How can i get my ethernet ID using winsock control??

Communication Through Ethernet
I was wondering if anyone could help me started with communication with Winsock.

Up till now I used to communicate throug a rs-232 port with a device..buth I now have a device wich has an ethernetport. The communication protocol will be the same eg. hexidecimal codes.

How do I setup and configer Winsock and how can I get a 'On_Comm' event from winsock?

If anyone could help me started...
thank u

Comport Or Ethernet?
Dear Experts,
I am programming a software for a hardware interfaced using either the comport or the ethernet.

I am now specifying in my software whether the harware device has to be connected using comport or the ethernet and then i am clicking on connect button to connect to the machine. And if the software finds that the machine is not connected with the specified connection then it gives an error message.

But what i want to do is.... When i click on Connect Machine button, then my software should automatically search for, which connection the machine is being connected and then connect using that perticular connection. How can i do this?

Please help with this query.....

Test The Ethernet
I need to do a test for the ethernet card on my system.

Any idea? Loop back test? or any program to do some other test.

Ethernet Communication
hi friends,

Which is the best control to communicate with a device that is connected to the computer via ethernet(TCP/IP). as far as i know winsock will serve the purpose, does anyone why any better controls.

thanks

Please Tell Me How To Get The Ethernet Card ID Num?
Please tell me how to get the Ethernet card ID Num?

Ethernet And Internet
I currently have two PC`s one a Desktop and the other a Labtop, I have a Hub and are going to attempt to link the two up, i know how to set up the TCP/IP and Workgroup settings, but both Pc`s are also able to access the Internet Via there own Modems, i know that only one can be used at any one time but does anyone see any problems inwhich i could be on a network with another Pc and be able to Dial Out on a modem (as long as the Line is free).

THanks for any thoughts on the subject and any Info, of what to and not do, is welcome

Thanks Guys/Gals

Ethernet Adapters
I would like to be able to switch IP address's of my Local Ethernet adapter
thru a Checkbox interface, between 10.0.0.51 / 255.255.255.0
And 192.168.1.200 / 255.255.255.0

How can I do this thanks

Port Number On Ethernet
I have an existing application where 2 software packages on 2 pc's communicate with each other via ethernet. I would like to replace the software on one of the pc's with my own vb software. My question is, how do I know what port number to use ?

Ethernet Adapter Control
I am looking for a way to control a NIC card, I want to be able to output a steady sream of ones or zero's through the port but can't see to find a control for it any idea's?


Thanks

Ethernet Interfaced Device
I have a ethernet interfaced device, a time recorder. I have also command list of the device. how can i control it from VB.

Multipile Ethernet Ports
I am using two ethernet ports for communuicating to two pc's. I have two seperate IP addresses. How do I select which port to send data from using winsock controls?

Indicator For Ethernet Activity
I am developing an application that a user can configure to retrieve information from an industrial controller. I would like to place two LED indicators on my form, one for transmit and one for receive. Is it possible to detect ethernet activity to and from a specific IP address?

Thanks,
Chris

Sending An Ethernet Frame
I want to connect to a machine using ethernet. This machine has, of couse, a MAC address which I have to use to make the connection. Note that the machine does NOT have an IP address.

I want to send Ethernet frames according 802.2 LLC/SNAP, meaning I want to alter the Ethernet frame to fit my needs before sending.

My question is: how do I send Ethernet frames in VB6? I have read something about raw sockets but this requires an IP address which I do not have.

Ethernet Adapter Address
Hi,

I write a software in Visual Basic and I would like to get the following info from my computer:

1. Ethernet Addapter address
2. IP Address
3. Netmask
4. Default Gateway
5. Host name of PC

Could you please send an example code that can do the above?
Thanks a lot for your help.
H.

Dual Ethernet Ports
I have two ethernet ports one for the company network and one for a small very busy network. What I am lookoing for is a way to tell the VB program what port to use. At present it will only use the default. Note: Both ports have differant IP address.

Properties Of Ethernet Adapter
In my project, I need to get various properties of ethernet adapter. How can I get it in VB6. is it available through windows API?

Ethernet Core Module
Does anyone know of an ethernet dore module that can be programmed in VB ? Rabbit.com make a module but there programming is Dynamic C,

Jerry

VB.6 User, Since 2002
Next Generation Lighting Controls
www.jmelectronics-online.com

Ethernet Promiscuous Mode
Hi:
I am tring to configure my Ethernet card in promiscuous mode and after to get the data across the net.

How can I do it?..

Thanks for your help. Bye....

Using Winsock With Multiple Ethernet Cards
does anyone know how to select which ethernet card is used by Winsock control in machines with more than 1 ethernet card?

Connect (PPP: Windows 9598NT42000) Over Ethernet
i need to coonect to the internet by using Point to Point protocol over ethernet through vb code. is it possible to do. and also by using the username and password with DNS server name has to connect to the internet. same like broadband connection. is it possible...

Please help me..............

Using Winsock With Multiple Ethernet Cards
My computer has 2 ethernet cards and I want to be able to control which ethernet card my winsock control uses to comunicate. Can anyone help me with this?

How To Find IP Address Of Ethernet Card
Hi every body

I want to find the IP address of a Ethernet card.
Not the IP address what the Os gives the card but the IP address
that will be permanently given to the card.Also called the Physical IP address of the card.
I have done this in C++ but donot Know how to do it in VB

How Many Multi Thread Possible In VB Ethernet Connection?
Hi,
I am create VBA program to read value from Ethernet device.
I manage to read from two Ethernet device at the same time.
I fail to read from third Ethernet device as third real time monitoring form that I created fail to be online.
How many multi thread can VB support?
How many multi thread support by XP SP2 OS?
Please advise

Visual Basic And Ethernet Packets
I have an application that takes data and sends it out
an ethernet port. As far as I can tell it takes 1.5
seconds to send out 58 characters.Can anyone point me
in a direction that explains how VB packages the data
or how I can make the application run faster?

Enable/Disable Ethernet Adapter
In VB6/Windows 2000, how is it possible to:
1) Detect the Ethernet Adapter status (Enabled/Disabled)
2) If it is disabled, enable it and vise-versa.

Thanks,
Bill

SQl Does Not Collect The Fields
Hi everyone!

I do not know why this litte sQl statement does not collect the fiels of two tables, the first table is Projects is master and the second table is detail rsProjProd but does not pull up the fields.

With rsProjects
If .EOF Or .BOF Then Exit Sub
sQl = "SELECT * FROM Projects WHERE ProjectID=" & rsProjProd!ProjProdID & ""
Set rec = New Recordset
rec.Open sQl, cn, adOpenDynamic, adLockOptimistic

End With

Thank you

How To Collect All Project *.ocx, *.dll
how to collect all project *.ocx, *.dll, is that easy way to do this?!

Is any software can do this?

How To Collect Bugs?
If project build to EXE file.when run this program then, if raise a error,this error can output a simple error message.
but we want to get more error.let we know error's position.

how design this bug collecter?

In my project.
I attach "on error goto errlabel" in my each function/sub.

and you?

Sending And Receiving SNAP/Ethernet Packets
I am using VB6 and I want to send a SNAP packet (802.2) to a defined desitination (MAC address). My question is simple: how do I accomplish this?

A SNAP (Sub-Network Access Protocol) packet looks almost like an ethernet packet. If I am correct, this protocol is located below the TCP/IP stack. I have browsed the Internet for a solution and what I found was that I should use the WinSock Control and set the type of the socket to SOCK_RAW (raw socket). This, however, is not possible; the type can only be initialized with TCP or UDP. When using the Winsock Win32 API I can create a raw socket. But when I examine some sample code I somehow have the feeling that I am still on top of a TCP/IP stack because they require for instance an IP destination address.

Ok, attempt number 2 concerns WMI. I saw that when using WMI I can query my computer what NICs I have (I have a wired and a wireless NIC). But I am wondering if I can address a NIC and send a packet to it which the NIC will handle properly. I haven't found any interface to the WMI-COM to do this.

Again, what I want is this:
1) create/define a packet and initialize all required fields like MAC destination and source address.
2) present the packet to the ethernet driver (directly or indirectly?!?) to transmit the packet.
3) configure a listener for any receiving packets.

Can somebody help me with this problem; any link to sample source code will be very appreciated.

Sending Intermec Printer Commands Through Ethernet
Im trying to send printer commands to a Intermec Label Printer through the ethernet, I use to do this through the Serial port and know I'm working with printers that are on network, I know how to print to a printer using the Printer Object but I need to send IPL commands straight to the printer to get status and print labels. I'm trying to do this in VB 6.0. Any help would be great.. Thanks

Ethernet Card Number Generation Through VB 6.0 Or VB.NET Programming
hi

i want know how to Get the Ethernet Card Number through VB 6.0 & VB.NET Programming,

Is there any API is available to get the Ethernet Card Number through programming

No body aware of this kindly reply as soon as possible

with kinds regards
syedhanif

Collect Modem Properties
I'm currently working on a VB6 project in which a connection is made with mscomm using a dial-up modem, either internal or external. The program works for 1 specific modem, but when I connect another modem, failures start to occur. I'm not sure what the source of these problems is, but I suspect that different modems use different settings or commands. I want my application to work on any pc with a modem.

I would like my visual basic application to detect a local modem and the properties or commands required to communicate with it. These properties have to be included in the application so they can be used.

I searched the MSDN site and found something about the GetCommProperties function, but I don't have a clue how to include this, or its attributes (pointers and structures) in my VB program.

I hope someone can get me started. If possible, also with an expected time requirement for an inexperienced programmer to solve this. (I expect it will take a lot of time, but then again, the solution may be quite simple).

Greetz,
Jeroen

Convert Int To Binary And Collect Each Bit Value
May I know what is the code to convert an unsigned integer (0 to 65535) to Binary? Besides, how do I collect each bit value from the converted binary?
I am using VBA to run this.

Example case: Let's say I want to convert a random value 23767 to binary which the result is 101110011010111, then I need the 12th bit value (in red color) to be displayed or used.

Please help, Thank you very much. ~

Collect Path From GetFileName
Hi

I am collecting a filename using GetFileName for use in another macro, I also want to extract the path so that I can post new workbooks into the same folder.

Here is my code
Public fname as variant
Private Sub btnDirSelect_Click()
Application.EnableEvents = True
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Application.UserControl = False

Set wbImport = Application.ActiveWorkbook
Set wsImport = wbImport.Sheets("WIP_Control")

'Prompts user to select the input file
fname = Application.GetOpenFilename("Excel workbooks (*.xls), *.xls")
If fname = False Then
Exit Sub
End If


I have tried dimming fname as a variant which works for GetFileName but not for path and also as a workbook, which has a path but cannot collect fname. I have ticked MS Scripting Runtime and have tried the Folder object, but I couldn't make that work either. Alas!

Thanks very much - all advice very welcome!

Collect Icons At DLL File
Hi all ....
I need to know how to collect icons at DLL file .

How To Collect Information From Right Click
I have just written an application which opens a file when it's right clicked in windows using "Command". It then processes the file and converts it to the correct format.

When I try to collect information from multiple files, it only gives me the first file name.

Does anybody know a way of collecting multiple file names or am I going about this the wrong way ???

Many thanks in advance..... I hope....

Collect Time For Telephone Used
Dear Expert,
Is there any component on the Internet that can collect the time that phone call. I would like to use it in the apartment.

Thanks

Application To Collect Computer Name
Hi there.  I work at a college and am writing an app to monitor and capture student usage of computers.
The app works fine, all it does is capture the username the computer name and the date.
It sends this to a database and then the teacher can view a web page that will show the picture of the user and allow them to send a message or boot the student.

What I want is a way of programatically hiding the app.

I have been looking into running the app as a service.  Is that possible as I have forms that will pop up to display certain messages from the teacher and also it is polling to a database every 30 seconds.


Cheers


}...the bane of my life!
http://www.fuzzyd.co.uk

Copyright © 2005-08 www.BigResource.com, All rights reserved