What you suggest is pretty straightforward with g-code. One would expect to have the item secured properly to the print bed. The printer you've indicated has movement only in the Y direction, which means your g-code should reflect that movement only. X-direction movement means the head will travel left and right and have nearly zero effect on the item. This also applies to Z-movement of the carriage.
Marlin (a common firmware) web page lists a specific g-code for repeat:
The Repeat Marker command is used to define regions of a G-code file
that will be repeated during SD printing. A marker is first set with
M808 L[count], and later in the file a plain M808 command is used
count down and loop. (By default up to 10 start markers can be
In slicer software put M808 L to the “Start G-code” and M808 to the
“End G-code.” But this command is not the only requirement. Before
starting each whole object it’s important to actually clear the print
area of obstacles and to reset the coordinate system with G92 or G28,
so this command is best used with belt printers or other systems with
automatic print removal.
From a different page on the same site:
The G0 and G1 commands add a linear move to the queue to be performed
after all previous moves are completed. These commands yield control
back to the command parser as soon as the move is queued, but they may
delay the command parser while awaiting a slot in the queue.
A linear move traces a straight line from one point to another,
ensuring that the specified axes will arrive simultaneously at the
given coordinates (by linear interpolation). The speed may change over
time following an acceleration curve, according to the acceleration
and jerk settings of the given axes.
More details specific to this command are also on the linked page. A simple example of a movement g-code:
The most basic move sets a feedrate and moves the tool to the given
G0 X12 ; move to 12mm on the X axis G0 F1500 ; set the feedrate to
1500 mm/min G1 X90.6 Y13.8 ; move to 90.6mm on the X axis and 13.8mm
on the Y axis
There are some caveats related with feedrates. Consider the following:
G1 F1500 ; set the feedrate to 1500 mm/min G92 E0 G1 X50 Y25.3 E22.4 ;
move while extruding
In the above example the feedrate is set to 1500 mm/min, then the tool
is moved 50mm on the X axis and 25.3mm on the Y axis while extruding
22.4mm of filament between the two points.
G1 F1500 G92 E0 G1 X50 Y25.3 E22.4 F3000
However, in the above example, we set a feedrate of 1500 mm/min on
line 1 then do the move described above, accelerating to a feedrate of
3000 mm/min (if possible). The extrusion will accelerate along with
the X and Y movement, so everything stays synchronized.
Consider to limit your acceleration based on the weight of the secured item. You would not be worried about precision, but skipped steps due to weight could bring the bed travel to the physical limit stops, causing stepper grinding.