I've successfully connected the 3D Chameleon control board to the Power Control port of my BTT E3 Mini V3. It's connected to pin PC13, translated to pin 45 in g-code. The commands that work and have been tested are:
M42 P45 I1 T1 S1 ; Initialize 3D Chameleon (off)
M42 P45 S0 ;Activate Command Mode
M42 P45 S1 ;Deactivate Command Mode
Now I tried writing a short G-Code script to set the pulse time to 100ms. The above commands work, but when I execute the G-Code below, the control board just pulses every half second until I manually issue the M42 P45 S1 command. Is this command no longer supported or am I doing something wrong?
M42 P45I1T1S0 ;Initialize Pin and set
G4 P7500 ;Pause for 15 pulses
M42 P45S1 ;Release Pin
G4 S3 ;Wait 3 seconds
M42 P45S0 ;Set Pin for delay
G4 P100 ;100ms
M42 P45S1 ;Release Pin
G4 S3 ;Wait 3 seconds
M42 P45S0 ;Set Pin for delay*2
G4 P200 ;200ms
M42 P45S1 ;Release Pin
Thanks!
Just a quick update! With the Chameleon controlled digitally, there's no convenient way of testing it. I've writen the following script to place on your SD card to load macros to accomplish this. Name the file auto0.g to have it automatically load the macros when starting the printer.
You'll need to change the pin (P45) to the pin you're using on your control board.
Once loaded, entering the macro code in a terminal connection will execute the following commands:
G810 - Select 0 (filament 1) G811 - Select 1 (filament 2) G812 - Select 2 (filament 3) G813 - Select 3 (filament 4) G815 - Feed or retract 10 Seconds (Use after Select command) G816 - Initialize Port (Do first before other commands) G817 - Reset 3D Chameleon
UPDATE: I've revised the code to be more practical for testing.
You may have to recompile Marlin to allow Macros.
You know... Looking at this GCode, I don't see anything wrong except you don't have the proper spacing in the commands. Each parameter needs white space between them for Marlin to see it.
Make sure the P and S parameters have a space between them and it should work.
Bill
I find this approach very interesting. I have the same board. Why choose the power control port? Please keep us posted. I would be interested to see the g-code that you came up with.
The Mk3 firmware doesn't support that command at this time. It was causing more issues than it helped, as others were trying to change the timing for the normal button presses and not understanding the fact that the motion also caused a timing change.
In the Mk4 firmware (which will be released next month), there will be an updated version of this function that doesn't require programming, and will use 50/100 ms timing instead. But for now, I suggest using the normal timing as we programmed it... just add 50ms to the commands to make sure you're in the proper window. (You're literally the only person who's asked about this in over a year! ;-) )
Bill