Here is where I have some issues:
We set the profile to 2- This is a Trapezoid Plus
We set V2030 to 59,590- This is the number of pulses to the servo??? I think, but not sure.
We set B2056.7 Process Command on.
I am assuming your mapping in the H0-CTRIO2 has 2 ranges with Inputs mapped at V2000-2025, and Outputs mapped at V2030-2061. With that said, yes, setting Parameter 3 (V2030-2031) = 59,590 decimal will cause the CTRIO2 to output that many pulses.
The next line of programming we check B2022.7 Command Complete and if there is a Command Error, B2022.6. If complete and no error then we reset Process command, B2056.7 and turn on B2056.0, enable output.
When the output is enabled I think that the CTRIO is supposed to send 59,590 pulses out. This is what I am not sure of because I have not found a way to verify the the correct number of pulses have been sent. I did check the output active, I believe this is B2022.4, and it is off. Then again it could have switched on then gone off very quickly.
Output Active bit (B2022.4) will only be ON during the time period that the CTRIO2 is outputting the 59,590 pulses. Then it will go OFF.
Here are my questions: Is there an easy way to verify the number of pulses that are sent to the servo?
Although I have the greatest of confidence the CTRIO2 is sending the exact number of pulses in Parameter 3 (this product has been around a long time), the easiest way, if possible in your application, is to temporarily wire the CTRIO2's pulse output to its pulse input and configure that channel (Ch1/Fn1) to count pulses. The CTRIO2 will then count the pulses generated by its own output and map that value to V2000-2001 (with your current mapping).
Am I correct in thinking that the CTRIO Trapezoid Plus profile is just sending the number of pulses that we are putting in Parameter 3?
Yes.
Is the output active the only indication telling us that the file has been completed? Meaning that the output was enabled, the pulses have been generated and sent and then the output active is turned off?
Well, technically no. There are a number of things that could indicate various aspects of the output:
- Output Enabled (B2022.0) tells you that you have enabled the output (B2056.0 = ON).
- Output Suspended (B2022.2) tells you whether the output has been suspended (i.e. B2056.2 is ON for some reason).
- Output Stalled tells you if the output has stalled. In other words, if the CTRIO2 pulse output cannot generate pulses because its scan time is too high.
Are there any other possible issues that could cause issues with the pulses being sent out?
Well, not with the number of pulses, no. Whether the servo drive is receiving them is another issue (wiring?). Or whether it can handle them is another issue (accel/decel or min/max freq values of the pulse profile out of its range?). Or whether the machine moves the correct distance can be mechanical issues.
Can we disable the profile before it has been completed?
Some options:
- You can suspend the output by setting B2056.2. This will cause the CTRIO2 to ramp down at the decel rate in your profile, to zero velocity. Then, if this bit is reset, the CTRIO2 will ramp up toward max freq at the accel rate in your profile in attempts to get to the full number of pulses in Parameter 3.
- You can turn the output off by resetting B2056.0. This will abruptly stop the pulses. This is not usually a good idea for a machine with enough mometum to damage itself.
Would there be a different indication, ie fault?
If the CTRIO2 output stalled as mentioned above the appropriate bit would be on. And, of course, if the command failed your command error bit (B2022.6) would be on.
BTW, I noticed in your pictures that you are using discrete logic to work with the H2-CTRIO2. I would recommend you utilize the IBox instructions for the CTRIO2 (they all start with "CTR"). They clean up your ladder logic and are easier to use than discrete logic. Just FYI.