Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add modbus snippet type #18

Open
agaget opened this issue Mar 29, 2019 · 3 comments
Open

add modbus snippet type #18

agaget opened this issue Mar 29, 2019 · 3 comments
Assignees

Comments

@agaget
Copy link

agaget commented Mar 29, 2019

A appeler epics.record.[type].modbus ou du genre

record(longout, "$(SIGNAL)") {
field(DTYP,"asynInt32")
field(INP,"@ASYN($(PORT) $(OFFSET=0))MODBUS_DATA")
}

record(ai, "$(SIGNAL)") {
field(DTYP,"asynInt32")
field(INP, "@asynMask($(PORT) $(OFFSET) $(NBITS))MODBUS_DATA")
field(LINR,"$(LINR=LINEAR)")
field(EGUL,"$(EGUL)")
field(EGUF,"$(EGUF)")
field(EGU, "$(EGU)")
field(HOPR,"$(EGUF)")
field(LOPR,"$(EGUL)")
field(PREC,"$(PREC)")
field(SCAN,"$(SCAN)")
}
record(ao, "$(SIGNAL)") {
field(DTYP,"asynInt32")
field(OUT, "@asynMask($(PORT) $(OFFSET) $(NBITS))MODBUS_DATA")
field(LINR,"$(LINR=LINEAR)")
field(EGUL,"$(EGUL)")
field(EGUF,"$(EGUF)")
field(EGU, "$(EGU)")
field(HOPR,"$(DRVH)")
field(LOPR,"$(DRVL)")
field(DRVH,"$(DRVH)")
field(DRVL,"$(DRVL)")
field(PREC,"$(PREC)")
}
record(bi,"$(SIGNAL)") {
field(DTYP,"asynUInt32Digital")
field(INP, "@asynMask($(PORT) $(OFFSET) $(MASK))")
field(SCAN,"I/O Intr")
field(ZNAM,"$(ZNAM=OFF)")
field(ONAM,"$(ONAM=ON)")
}
record(bo,"$(SIGNAL)") {
field(DTYP,"asynUInt32Digital")
field(OUT, "@asynMask($(PORT) $(OFFSET) $(MASK))")
field(ZNAM,"$(ZNAM=OFF)")
field(ONAM,"$(ONAM=ON)")
field(HIGH,"$(HIGH=0)")
}
record(mbbi,"$(SIGNAL)") {
field(DTYP,"asynUInt32Digital")
field(INP, "@asynMask($(PORT) $(OFFSET) 0xFFFF)")
field(SCAN,"I/O Intr")
}
record(mbbiDirect,"$(SIGNAL)") {
field(DTYP,"asynUInt32Digital")
field(INP, "@asynMask($(PORT) $(OFFSET) 0xFFFF)")
field(SCAN,"I/O Intr")
}
record(mbbo,"$(SIGNAL)") {
field(DTYP,"asynUInt32Digital")
field(OUT, "@asynMask($(PORT) $(OFFSET) 0xFFFF)")
}
record(mbboDirect,"$(SIGNAL)") {
field(DTYP,"asynUInt32Digital")
field(OUT, "@asynMask($(PORT) $(OFFSET) 0xFFFF)")
}

//A tester
record(waveform, "$(SIGNAL)") {
field(DTYP,"asynInt32ArrayOut")
field(INP,"@ASYN($(PORT) $(OFFSET=0))MODBUS_DATA")
field(FTVL,"LONG")
field(NELM,"$(NELM)")
}
record(longout, "$(SIGNAL)LONG") {
field(DTYP,"asynInt32")
field(INP,"@ASYN($(PORT) $(OFFSET=0))MODBUS_DATA")
}

@agaget
Copy link
Author

agaget commented Mar 29, 2019

Bon on est d'accord, une fois qu'on a un fichier template avec ça on n'a pas vraiment à le refaire à l'infini mais bon ça fait un produit plus fini.

@vnadot
Copy link
Collaborator

vnadot commented Apr 8, 2019

Je propose de mettre seulement:

  • field(INP, "@asynMask($(PORT) $(OFFSET) $(NBITS))MODBUS_DATA")
  • field(OUT, "@asynMask($(PORT) $(OFFSET) 0xFFFF)")

@vnadot vnadot closed this as completed Apr 8, 2019
@vnadot vnadot reopened this Apr 8, 2019
@agaget
Copy link
Author

agaget commented Apr 8, 2019

Proposition rejeté, les différents champs OUT et INP sont différents en fonction des types et il faut aussi au moins le DTYP et tu noteras que pour le waveform par exemple ce n'est pas asynMask, mais asyn

@vnadot vnadot self-assigned this Jul 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants