Hello Guest it is April 25, 2024, 11:48:28 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - brianthechemist

Pages: 1 2 »
1
Hi everyone,

I'm looking for either a register or a command to start/stop specific modbus functions and/or devices.  (similar to right-clicking on the device or function in the Modbus Diagnostics window).  I'm trying to limit overhead and only use the toolchanger modbus when needed so I can turn off the toolchanger between changes.

I was able to find the command register to enable/disable ALL of the modbus at once: mbcntl/command but I was hoping for more granularity

I'm also able to find the status of each device/function but they appear to be readback only and not commands (for example MB2-6052/function0/rc )

Thanks!

2
Hi everyone,

It is FINALLY time for me to test my toolchanger integration with mach.  It looks like it is possible to use the simulator instead of my motion controller, but it is not clear to me how this works.

Ideally, i would be able to clone an existing configuration (pins, signals, etc) and have it function without needing the actual servos and limit switches connected.  The toolchanger controller is connected via modbus tcp, so there isn’t any need to actually trigger inputs or outputs on my ESS for communication.

My goal is to test the lua and gcode interactions with the toolchanger

Is this possible with the simulator works? I can’t find any documentation on it.

Thanks!

3
Hi all,

I am working on my toolchanger integration and currently have a test panel set up in Mach that sends/receives commands from my toolchanger PLC over ModbusTCP.

I've noticed that the outgoing Modbus holding registers are not updating but the coils are.  I'm using sliders for the holding regs and buttons for the coils.  The Mach variables corresponding to the modbus regs will update, but for some reason, the modbus register is not.

I think here a picture is worth 1000 words .  As you can see, register TC_87 "changer command" on the GUI slider has no issue updating the M4 registers, but for some reason, the same register in the Modbus Diagnostics tool is not updating.

I've also attached the modbus config in case there's something I missed.

The coils work perfectly.  I haven't tested the incoming HREGs but that is next...

4
I was over on the ESS forum and apparently this isn't an ESS warning.

Does anyone know what this could be referring to?  (the only IP communication I have is ESS and modbus TCP, both of which are working fine.)

5
For some reason, I can't get any registers to update (in any of my coding...?)

Here is the problem du jour:

I trigger this function via a SW toggle switch.  The code is running so it is reading the register correctly the first time (I get the "Joystick Jogging Enabled (Toggle)" logging message) but it is not able to read back the register to toggle off.

Is there something strange about 1 and 0, true and false?  Perhaps I am doing my booleans wrong?

Code: [Select]
function JJogEnToggleBrSp()
local inst = mc.mcGetInstance()
local JogEnH=mc.mcRegGetHandle(inst,"iRegs0/JJog/Enable");
local JogEn=mc.mcRegGetValue(inst,JogEnH);
if (JogEn == 0) then
mc.mcRegSetValue(JogEnH, 1);
mc.mcCntlSetLastError(inst, "Joystick Jogging Enabled (Toggle)") -- BS Debug
end
if (JogEn == 1) then
mc.mcRegSetValue(JogEnH, 0);
mc.mcCntlSetLastError(inst, "Joystick Jogging Disabled (Toggle)") -- BS Debug
end

end

6
PoKeys / Pokeys Plugin using excessive CPU
« on: March 06, 2023, 10:35:46 AM »
Hi everyone,

I just installed a pokeys 57E board into my machine for extra I/O (with a ESS for motion control),

My poor notebook is going insane (50% cpu load and apparently "very high" power usage (ha?) whenever it is enabled.  I don't even have any of the i/o enabled at this point.

I don't see any refresh rate configuration for it like the ESS has, but it appears to be wanting to update constantly (which is not necessary for me as it is just additional I/O)

The computer should have plenty of power to handle this (i7-6500 with 8gb ram)

Is this a known issue?


7
Mach4 General Discussion / Save resized view of a screenset?
« on: March 01, 2023, 12:06:34 PM »
I'm wondering if it is possible to save/export/etc the resized version of a screenset as a separate screenset of those dimensions?
(for example the 1024x768 screenset wx4 resizes nicely to HD but if you set the screen size to HD in the editor, then it will only occupy a corner of it and you would have to resize every component individually to get the same thing)

8
Mach4 General Discussion / PLC Script not updating all registers?
« on: February 28, 2023, 03:21:12 PM »
Hi everyone,

I have a number of registers that I'm reading from my VFD (via modbus) that have some small scaling calculations done to them and eventually become values for a diagnostics tab in my screenset.

For some reason, only some of the code appears to be getting executed (the "Set target ROM and DRO" block).  What am I missing here? 

Code: [Select]
-- ************************* BrSp 02/22/23 **************************************
---------------------------------------------------------
--          set Target RPM and DRO
---------------------------------------------------------

RPM=mc.mcSpindleGetCommandRPM(inst);  -- Use mcSpindleGetCommandRPM
local hRPM=mc.mcRegGetHandle(inst,"iRegs0/MbVFD/SetRPM");
mc.mcRegSetValue(hRPM,RPM);

--Spindle Override Check
local OVRenable=mc.mcSpindleGetOverrideEnable(inst);
  if OVRenable then;
    local OVR=mc.mcSpindleGetOverride(inst);
    RPM=RPM*OVR;
  end;
local range=mc.mcSpindleGetCurrentRange(inst)
if RPM>mc.mcSpindleGetMaxRPM(inst,range) then RPM=mc.mcSpindleGetMaxRPM(inst,range) end;
if RPM<mc.mcSpindleGetMinRPM(inst,range) then RPM=mc.mcSpindleGetMinRPM(inst,range) end;

-- Calc and set the frequency to the VFD
local freq=RPM/6*10;  -- ie 24000 rpm /6 = 400Hz but WJ200VFD wants 4000 as input (no decimals)
local hsetHz=mc.mcRegGetHandle(inst,"iRegs0/MbVFD/SetHz");
mc.mcRegSetValue(hsetHz,freq);
local hfreq=mc.mcRegGetHandle(inst,"MbVFD/W_VFDSpd_Hz");
mc.mcRegSetValue(hfreq,freq);

-- Get the actual RPM from the VFD
local aFreq=mc.mcRegGetHandle(inst,"MbVFD/R_VFDRPM_Hz");
local hActRPM=mc.mcRegGetHandle(inst,"iRegs0/MbVFD/ActRPM");
local readBackRPM=aFreq/10*6;
mc.mcSpindleSetSensorRPM(inst,readBackRPM);
mc.mcRegSetValue(hActRPM,readBackRPM);

---------------------------------------------------------
--          scale VFD readbacks
---------------------------------------------------------

local iVolts=mc.mcRegGetHandle(inst,"MbVFD/R_VFDVolt_V");
local hVolts=mc.mcRegGetHandle(inst,"iRegs0/MbVFD/Volts_S");
local readBackVolts=iVolts/10;
mc.mcRegSetValue(hVolts,readBackVolts);

local iPwr=mc.mcRegGetHandle(inst,"MbVFD/R_VFDpwr_KW");
local hPwr=mc.mcRegGetHandle(inst,"iRegs0/MbVFD/KW_S");
local readBackPwr=iPwr/10;
mc.mcRegSetValue(hPwr,readBackPwr);

local iCur=mc.mcRegGetHandle(inst,"MbVFD/R_VFDcurr_A");
local hCur=mc.mcRegGetHandle(inst,"iRegs0/MbVFD/Curr_S");
local readBackCur=iCur/10;
mc.mcRegSetValue(hCur,readBackCur);

local iTemp=mc.mcRegGetHandle(inst,"MbVFD/R_VFDTemp_C");
local hTemp=mc.mcRegGetHandle(inst,"iRegs0/MbVFD/Temp_S");
local readBackTemp=iTemp/10;
mc.mcRegSetValue(hTemp,readBackTemp);

-- **************************************************************************

The Current value "R_VFDcurr_A" is a perfect example.  The value coming back from the VFD is 0, as is the register it is stored in.  But somehow, the Curr_S register is not being updated.  The script posted above is being executed correctly for the "SetRPM" and "SetHz" values.

Any thoughts?
If I set the initial values for the Curr_S register to a value, that value is quickly overwritten by the value you see and then is static.

9
Hi everyone,

I'm using the modbus plugin to talk to my VFD and I had it working last friday... I have been seeing some flaky behavior in the plugin, sometimes in the config screen it will not save my changes after I press "ok".  I'm wondering if there is a bug or something. (Version 4746)

Somehow now I get an incorrect value for a register read and this "195 - Unknown error" for the write. 

Both functions work perfectly well in the "CAS Modbus Scanner" that I have been using to troubleshoot.

Any thoughts?

10
Modbus / More modbus "functions" or fewer (with multiple regs per)
« on: February 22, 2023, 01:16:30 PM »
Hi everyone,

I've got my modbus TCP working finally and I'm in the process of making a small tab with VFD readbacks (temp, current, voltage, etc).

I currently have 14 functions, all read except for one for spindle speed (run control is by terminals for safety and convenience).  Things are a bit slower than I would like (polling interval 250ms, wait 100)

I have 3 of my 14 functions timing out, (oddly, they are in the middle of the list).  Is it more efficient time-wise to group some of the functions together where possible and have one function read multiple registers? (some of the regs are next to each other).  I've attached the list for reference

Or is it really just the same timing no matter what?

I thought I read somewhere that mach goes down in the sequence, waiting the timeout time for each transfer.  If this is the case, fewer transfers would be better.  In practice, it may not make a difference. 

Pages: 1 2 »