Hi guys.Can you write a program that reads data through a com1 serial port that communicates with a plc using c++ and inline asm instead of the ladder logic interface?
I work at a cinema as a projectionist and the whole booth is automated with a bunch of these monsters through a CAN network.
The PLCs are programmed with a ladder logic interface with which i don't cope to well so before i begin studying the 8250 registers or the win32 functions for i/o i would like to know if i would be getting somewhere using this approach.Many thanks in advance!
caut_baia
9
Posting Whiz
Recommended Answers
Jump to PostThe way to communicate through com1 will depend on the operating system. MS-Windows, use CreateFile() to open the com port, then ReadFile() and WriteFile() to read/write to it. See commuications functions for more …
Jump to PostWhen you open the com port with CreateFile() you can specify a callback function that MS-Windows will call when data arrives at the port. That way you don't have to keep polling it to find out if there is data.
All 6 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
caut_baia
9
Posting Whiz
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
caut_baia
9
Posting Whiz
caut_baia
9
Posting Whiz
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.