Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Programming Windows timers

Status
Not open for further replies.

Bukitoo

Full Member level 2
Full Member level 2
Joined
Oct 12, 2003
Messages
122
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,298
Location
Argentina
Activity points
1,061
Hi! I want to implement a Application that communicates with a embedded system over MODBUS protocol (over serial line). The specification says that (in RTU mode) the timout between characters mst be 3.5 times one character. That time, at somes boudrates, could be less than 1 ms. How can I make a timer with that resoultion use window OS? Is that possible ?

Thanks In advance
 

us the winos system high resulotion tick count,you can file help in msdn
 

This is what I use when I am writting out in my VB modbus application:

MBrtu.Modbus.Output = SendMessage$

PauseTime = 1 ' Set duration.
Start = Timer ' Set start time.
Do While (Timer < Start + PauseTime) And (MBrtu.Modbus.InBufferCount < 8)
DoEvents
Loop

RecvMsg$ = MBrtu.Modbus.Input


Chris Atwan
 

Hi!
look in this web lvr point com Jan Axelson have a project maybe can help.
if you use ascii no have problem with the time.

best regard
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top