Soder,
Looks like you're not far from something running.
* DUT (PULSE LINEAR):
...
InitialSpeed := 10, <-- Set here the highest values you can
MaximumSpeed := 100000, <-- As far as I know the composite speed cannot be that high
...
(* falling edge at x- or y-axis, or first time *)
IF DFN(R903A) or DFN(R903C) or runonce THEN
runonce := FALSE;
(* change direction *)
ChangeTargetXY(DUT_In:=dut,DUT_Out=>dut);
...
- "IF DFN(R903A) or DFN(R903C)" should become "IF DF(NOT(R903A) AND NOT(R903B))".
* EV_Channel2 AT %MD5.90105: DWORD:=0;
TV_Channel2 AT %MD5.90107: DWORD:=0;
- Confusion in addresses: 90200 and 90202 will help you to succeed at 100%.
* How do we tell the system where the (0, 0)-point is?
- The Home function is an important part of the job. You could also home at coordinates <>0.
* Sensors: only use X2/X5. The associated functions are all built-in. There is no programming there. As previously stated, check the axis elapsed values and perform a "near home" through DT90052 (slowing down your axis). You keep two inputs free for other assignments.
* Over-travel sensors: re-read the previous posts. Don't take a chance to damage your axis. Prefer wired safety functions switching your power off (or the drive's power stages).
* We cant "debug" the code while we're testing the
communication since we have to "disconnect" FPWinPro from
the PLC and connect HyperTerminal instead...
- Perhaps there is a confusion here. The programming port is called TOOL port and not COM port. This label usually refers to the communication cassette including one or two additional ports.
Whether you decide or not to use a communication cassette, why not choose the Computer link mode? It's easier for your computer to write into the PLC by using the protocol (only one request to implement for coordinates changes). There is no program required in the PLC. Notice: the protocol is available on both TOOL and COM communication ports. See your manual. Ask for details about this Protocol. Documentation available upon request. See your distributor. Tests can be performed with HyperTerminal.
A tool called "Control CommX" is also available for interface's programmation in VB and easy access to NAIS FP products.
For tests: have a look at
http://www.kepware.com and download a demo version of their NAIS/Aromat/Matsu OPC server.
Laurent