Please enable JavaScript to view this site.

DAQFactory User's Guide

Navigation: 16 Serial and Ethernet Communications

16.4 Using Comm Devices

Scroll Prev Top Next More

With the exception of comm device using the NULL protocol, most comm devices work much like a regular DAQFactory device.  Once you have created a new comm device you will see your device name listed as an option for your channels.  To perform communications, create new channels specifying your comm device name as the device in the channel table or view.  You will then be presented with I/O Types depending on which protocol you are using with your device.  The meaning of D# (device number) and Channel # will also depend on the protocol.  For example, in ModbusRTU, the device number is the module address, while channel number is the Modbus tag (without the 30,000 or 40,000...).

You will also see that your new comm device's name will appear in the list of devices in the device configuration window.  If you wish to change the protocol or tweak the communications settings, you should click on your device name and not New Serial (RS232/485) / Ethernet (TCP/IP) device as this would create a new comm device.

Note: If using channel timing, you will usually want to set the timing / offset of all channels that communicate on a single serial / ethernet port to the same value.  This will put them on the same thread and cause the requests to execute in turn.  Likewise, if you have channels that communicate on multiple ports, you will want to use a different timing/offset combination for each group on a single port so that different ports end up on different threads.  In this way, while DAQFactory is waiting for a response on one port, it can be communicating on the other port.

Deleting a Comm Device

If you create a comm device that you no longer need, you can easily delete it.  You will have to be in Safe mode to do so however.  So, first select File - Switch To Safe Mode.  Then to delete the comm device, select Quick - Delete Comm Device.  This will display a list of comm devices in your application.  Click on the desired device and hit DELETE.  This will remove the device.