Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: compewter_numerical on February 03, 2020, 04:38:08 PM

Title: PMC Read Register
Post by: compewter_numerical on February 03, 2020, 04:38:08 PM
I'm trying to read a register I defined ... "gRegs0/MpgXAxis" using the PMC.

I want to check if the value of that register is 1 then trigger an output. I am trying to do this all in the PMC but I can't figure it out.

The documentation says:

Code: [Select]
If the input condition to this instruction", is true, then a single sample from the defined register is acquired and stored in the variable `Aname'.
(http://compewternumerical.com/PMCIssue.PNG)

If I try to create the PMC program without the MOV 0 function to OUTE2 it will return an error during the simulation and those rungs just won't work.

Title: Re: PMC Read Register
Post by: compewter_numerical on February 03, 2020, 11:26:15 PM
whoops i should have taken the instructions from the manual literally. for anyone who needs the answer to this you must name the variable with the 'A' in front to read the value from the register.  :o