08-19-2020 10:33 PM
Trying to understand how to use Tasks and Channels to write Discrete outputs. I see where a Task encapsulates operations and information, and that one or more channels are created and assigned to a Task.
How do I write to a single bit in a Port?
In the example code it looks like a channel with 28 lines is created, and all lines are written at once.
Do I need to create a separate Task for each line?
Documentation refers to having multiple channels in a task, and that each channel can have a name that is referenced in calls to other functions. I can see how to create a name for channels, but not how to reference individual channels by name in a WriteDigital function.
Thanks in advance!
08-20-2020 06:03 AM
If you only want to write to one line/port at a time, then each line/port should be put into its own task.
08-27-2020 07:20 PM
Thanks, I appreciate it. The more I played with it, the more obvious that became. Just didn't understand the concept of creating multiple channels within a single task if I couldn't read/write the channels. It must be that the functions are made generic so that individual functions can handle many different situations.
Thanks again, and thanks for not berating a person asking a simple question.