Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Han

Pages: [1]
1
Technical support / Re:Urgently need your help to solve Auto485 problem
« on: December 13, 2005, 06:45:59 PM »
DAER SIR, BELOW IS PORTION OF H-COMMUNICATION MANUAL TOGETHER WITH H-SERIES PLC. CAN I HAVE THE SAMPLE C PROGRAM MENTIONED IN THE MANUAL??



   Host Communication Program Examples

Two sample programs, one written in Microsoft GWBASIC (HOSTCOMM.bas) and the other written in Borland International's Turbo C (HOSTCOMM.C), are provided in the TRiLOGI distribution diskette to help programmers get started. Both programs essentially perform the same functions,  as follows:

(a)    Prompt user to enter the desired command block via the PC's keyboard.

(b)   Initiate a communication session (for point-to-point protocol only) and send the command string to the controller.

(c)   Wait to receive the response block from PLC and display the response block on the PC's screen.

These two programs incorporate all the codes needed to communicate successfully with the T20/28/44H in either BASIC or C language using the point-to-point protocol. Programmers can therefore build their applications using either of the programs as building blocks.

For those who wish to experiment with the RS485 network, A program "Host485.C" in Turbo C language has also been included. This program assumes that an RS232-to-RS485 adapter is used such that the direction of communication of the RS485 bus is controlled by the state of /RTS line of the RS232C. This program accepts both point-to-point and multipoint commands from the keyboard and automatically initiates the correct communication protocol with the control. If your RS485 adapter works differently then you must modify the functions "transmit485()" and "receive485()" to control the direction of the half-duplex RS485 bus. Please refer to the technical manual of your RS485 adapter for details.

Although written for RS485 bus, you can also experiment with this program using PLC's RS232 interface, you would however not be able to link more than one H-series PLC to the host PC in this case.

2
Technical support / Re:Urgently need your help to solve Auto485 problem
« on: December 12, 2005, 04:58:11 PM »
Thanks.

3
Technical support / Re:Urgently need your help to solve Auto485 problem
« on: December 12, 2005, 01:12:32 AM »
Thank you for your reply. but the problem still exists. I tried many timer setting, yet couldn't find a proper one.
So can you please kindly tell me how you control transmission in your WinTriLogi program? I really have no clue why my program can't work without having tried yours first?
FYI, it seems WinTriLogi couldn't work well under RTS mode either. (as "no response from PLC" displayed)
At first, I tested my program using Auto turnaround mode, 95% of the time it works well. However, as a industrial control system, I couldn't afford any data transmission error. WinTriLogi also works well when set to Auto Turnaround mode.


4
Technical support / Re:Urgently need your help to solve Auto485 problem
« on: December 11, 2005, 03:56:54 AM »
Thanks! But I still facing the same problem. So I repeat my problem and hope you can help me out of difficulty.
1. Power on pc.
2. Open my own program.
3. send a commond to quiry PLC status using my own program.
4. Both green and red light indicator keep on blinking, data I collect     back all no "@01" (using another monitoring program)
5. Close my own program.
6. Open WinTriLogi program.
7. Open serial port using WinTriLogi and send a command like"@01"
8. The messgae displayed in WinTrilogi is "No response from PLC"
9. Close WinTriLogi program.
10. Open my own program and start working.
11. Wooo! Everything seems fine!
12. power off PC.
13. Turn on PC again, and I face the same problem.

Note: PC I used is industrial PC from Advantech and the serial port I use is COM1


5
Technical support / Urgently need your help to solve Auto485 problem
« on: December 10, 2005, 11:03:47 PM »
Hi, I have a problem with auto485 card. Here is the senario:
In my project, 3 H-series (T44H) are used to control 24 cylinders. Inside each PLC, a program is burnt in to control the movements of cylinders. 3 PLC is coordinated by a Main PC. Through a Auto485 card, 3 RS485 linked PLC card connected to PC. The software we use to control PLC is C++, and the communication mode of Auto485 is set to RTS. However, when I power on my pc for the first time, I always got communication probelm with Auto485 card. When I tried to quiry the status of PLCs, the light and red indicator on Auto485 kept on blinking. I give u a example; I sent a commond "@01RI0000*" to PLC, the received data is like "RI0005A*". Since I am not getting the correct data, so my program will keep on looping until I got the correct data. Sometimes, i have to wait for 5 minutes to get a correct format response.
The Funny thing is: when I close my own program and turn on WINTriLogi 3.52 software and send out the same commond thru controller->serial port setup interface, I would get a message like "No response from PLC". So I close this WinTriLogi 3.52 software and turn on my own program to try again, amazingly, everything is working properly!! So I want to know in your WinTriLogi source code, what you have done to configure the serial port? In my program, the code was written properly to control RTS line, but why my program just can't work properly at start up? And only can work well after having tried WinTriLogi??
Answer from you is Urgently needed!
Thanks!!

Pages: [1]