cp2e txd

Hi, I would like to seek advice on this ladder diagram. I want to send two sets of data with interval using 1 pb switch. For some odd reasons this ladder diagram doesnt activate the timer to enter the next state, instead keeps on transmitting the first data only. Can anyone point out the mistake I am making or a better solution for this will do too. Thank you in advance.
 

Attachments

  • 1.png
    1.png
    56.8 KB · Views: 19
  • 2.png
    2.png
    43.2 KB · Views: 19
Not exactly sure what you are doing as long time since I did Omron but at a guess you send data when input 0.03 is on (oneshot) that latches in 5.0 after Timer 1 it moves a value into D10 this is used to compare for 1 & trigger the second transmit, then timer 2 resets the rung before.
I suggest you just use timer 1 contact to enable the second logic this should do the same thing, however, again not sure about the transmit function as the first transmit is still on when you trigger the second one, perhaps put not timer 1 in the first transmit as below no need for the moves either
 

Attachments

  • lad2.png
    lad2.png
    55.3 KB · Views: 6
  • lad1.png
    lad1.png
    70.3 KB · Views: 5
Ah.. I noticed you sort of did this (well something similar on another post) using one timer I would try using the two timers as I posted as it may need a little extra time for the transmits, do you know if there are any user bits or registers that inform you of a transmit complete for example in mitsubishi there are standard variables that can be used to check if operations have completed.
also what if you trigger a send are you actually sending data ?
 
For some reason I don't like cascading multiple timers when one timer will do.

So how about this? It assumes the TXD instruction needs but a one-shot pulse (one scan cycle of its input rung being True).

Also, I just realized that the MOVs need to be replaced by something that transfers 3 words (6 bytes) to DXX, but that should be straightforward.

Finally, it does not have a second delay after the first timer expires, but if that is actually needed, then it should also be straightforward to add.
 

Attachments

  • lad1.png
    lad1.png
    54.8 KB · Views: 7
Also, if the timers work like the broken IEC timers do in TIA portal, i.e. -| |- T001 can evaluate to True, or -|/|- T001 can evaluate to False, during a single scan cycle before the TIM instruction is evaluated during that same scan cycle, then there will need to be a transfer of the T001 output value to a bit that is otherwise independent of the timer, or else the second trigger may not happen.

In fact, that may be why the original code did not work.
 
For some reason I don't like cascading multiple timers when one timer will do.

So how about this? It assumes the TXD instruction needs but a one-shot pulse (one scan cycle of its input rung being True).

Also, I just realized that the MOVs need to be replaced by something that transfers 3 words (6 bytes) to DXX, but that should be straightforward.

Finally, it does not have a second delay after the first timer expires, but if that is actually needed, then it should also be straightforward to a
hey, this code was super useful. I replaced the MOV with XFER and got it done. Thank you
 

Similar Topics

Hey, seeking for a small help on TXD here. This is a rs232 serial communications. Below, attached is a ladder diagram I have worked on. I am...
0
Replies
765
Views
Hello, I have problem using TXD in port 1 Omron CP2E. The A392.05 is at ON state after powering up. But the moment I hit 0.01 switch to initiate...
0
Replies
1,118
Views
Hi guys just i really need help for this one. I have uploaded the program from cp1e and my problem is I don't know how to download the program to...
2
Replies
773
Views
how to transfer program from cp1e-n to cp2e-n in cx programmer?
1
Replies
1,345
Views
Hi, I am working on a project where I am pulling in an array of data from an electric screw driver into my PLC through RS-232C. The data I am...
20
Replies
3,519
Views
Top