Tom Kazakoff
Member
I have writen a serial driver for the Mitsubishi QJ71c24n-r2 module. The driver controls a pump, that requires serveral commands. The software has been a nightmare to develop. I can not
get control of the timing. The code runs at a slower scan rate
but when set to run at .2 ms, does not run. I have interlocked
everything there is to, but still get errors.
I think the solution is to use something like Deco, so the
each command is a state. When I plug in Deco control of the
code, the communication stops completly. I have also tried
MCR commands with the same result. Without any way to force a
state machine, the code runs wild, getting stuck in one command
after another. When dugging, I have noticed that two command bits
are on at the same time, even though interlocking is in place.
Has anyone writen a similar piece of software, and it so, how
did you get control of the softare? It is supposed to send out
a command, wait until the "done" bit is set from the INPUT statement, turn off the bit that controls the command, set up
for a different command, set another bit, and repeat the process
until all commmands are sent. Each command is interlocked, and
each command uses the system bits to determine when the OUTPUT
and INPUT are done. The INPUT is triggerd by X3.
The communications are half duplex and should be pretty straight
forward.
I am considering trashing the code and attempting to use the
framing method of communicatons, but the manuals for this are
horrible and convey little or no information.
Any code examples or ideas on how to make this &&%%$ driver
work?
Tom Kazakoff
get control of the timing. The code runs at a slower scan rate
but when set to run at .2 ms, does not run. I have interlocked
everything there is to, but still get errors.
I think the solution is to use something like Deco, so the
each command is a state. When I plug in Deco control of the
code, the communication stops completly. I have also tried
MCR commands with the same result. Without any way to force a
state machine, the code runs wild, getting stuck in one command
after another. When dugging, I have noticed that two command bits
are on at the same time, even though interlocking is in place.
Has anyone writen a similar piece of software, and it so, how
did you get control of the softare? It is supposed to send out
a command, wait until the "done" bit is set from the INPUT statement, turn off the bit that controls the command, set up
for a different command, set another bit, and repeat the process
until all commmands are sent. Each command is interlocked, and
each command uses the system bits to determine when the OUTPUT
and INPUT are done. The INPUT is triggerd by X3.
The communications are half duplex and should be pretty straight
forward.
I am considering trashing the code and attempting to use the
framing method of communicatons, but the manuals for this are
horrible and convey little or no information.
Any code examples or ideas on how to make this &&%%$ driver
work?
Tom Kazakoff