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

Can you add BufferInput and BufferOutput ? #12

Open
jinyistudio534 opened this issue Apr 30, 2024 · 2 comments
Open

Can you add BufferInput and BufferOutput ? #12

jinyistudio534 opened this issue Apr 30, 2024 · 2 comments

Comments

@jinyistudio534
Copy link

di1 = DigitalInput(in1.channel1) # use channel 1 of terminal "out"
di2 = DigitalInput(in2.channel1) # use channel 1 of terminal "out"
do1 = DigitalOutput(out1.channel1) # use channel 1 of terminal "out"
do2 = DigitalOutput(out2.channel2) # use channel 1 of terminal "out"
ob0 = AnalogOutput(easycat.outputs.byte0)
ob1 = AnalogOutput(easycat.outputs.byte3)
ib1 = AnalogInput(easycat.inputs.byte13)
sg = SyncGroup(master, [di1,di2,do1,do2,ob1,ob0,ib1]) # this sync group only contains one terminal

What can be operated on above is not a single bit/Digital or a single number/Analog. Is it possible to process an array of values?
For example:
ob2 = BufferOutput(easycat.outputs)
ib2 = BufferInput(easycat.inputs)
sg = SyncGroup(master, [ob2,ib2])
ob2.value[0] = 12
ob2.value[1] = 13
n1 = ib2.value[2]

@tecki
Copy link
Owner

tecki commented May 9, 2024

Well, one can do all kinds of inputs and outputs. E.g. For the EL6022 there is a 23 byte buffer input and output. Also the serial device in serial.py uses it, an example on how to use buffers. Unfortunately it doesn't currently work, but I'll make it work soon.

@jinyistudio534
Copy link
Author

Looking forward to your good informations

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