Jump to content
  • 0

How to control Solenoid valves with TC-32 in labVIEW


Vishank Battar

Question

Hello,

I would like to use my TC-32 board to send digital outputs to a solid state relay rack to actuate a solenoid valve. However, I don't know how to send digital outputs from the TC-32 board, and I can't find useful blocks in the MCC user library in LabVIEW for controlling digital outputs. Does anybody know how to send digital outputs from the TC-32 board, or has anybody controlled solenoid valves with the TC-32 before?

 

Thank you.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hello @Vishank Battar.

To send a digital output signal from a TC-32, take a look at the 'Generate Values.llb' file, in the '\National Instruments\LabVIEW {version}\examples\ULx\Digital' folder, which is included with MCC's ULx for NI LabVIEW installation.

image.png

Select the 'ULx Write Dig Chan.vi' example.

image.png

 

When the example opens, you will need to change the 'Lines' field in the Channel Parameters.  Click on the down menu arrow and select 'Browse'.

image.png

 

Referencing MCC's Universal Library (UL) Help file (https://www.mccdaq.com/pdfs/manuals/Mcculw_WebHelp/ULStart.htm), it shows the TC-32's Port I/O with the output PortNum to be 'FIRSTPORTB', but a PortType of 'FIRSTPORTA' for Bit I/O.  If the list of channel options in the example only show 'Dev0/1stPortA/...', then the supported 32 digital output bits range from bits 8 thru 39, with 8 being digital output bit 0.  However, if the channel options show both 'Dev0/1stPortA/...' and 'Dev0/1stPortB/...', then 'Dev0/1stPortB/Do0' is digital output 0.  

image.png

 

Table 21 in the TC-32 User's Guide (https://www.mccdaq.com/pdfs/manuals/TC-32.pdf) shows pin 1 as digital output 0 (DOUT0).

image.png

 

With this example, you will need to remove the additional bit elements to test just the digital output 0 channel.

image.png

 

With regards to controlling a solenoid using a digital output channel, please reference the 'Digital Outputs/Temperature Alarms' section beginning on page 14 of the TC-32 User's Guide.  Take a look at Figure 7 which shows an example of controlling a relay.

 

Regards,

Fausto

Link to comment
Share on other sites

  • 0
On 1/23/2023 at 11:59 AM, Fausto said:

Hello @Vishank Battar.

To send a digital output signal from a TC-32, take a look at the 'Generate Values.llb' file, in the '\National Instruments\LabVIEW {version}\examples\ULx\Digital' folder, which is included with MCC's ULx for NI LabVIEW installation.

image.png

Select the 'ULx Write Dig Chan.vi' example.

image.png

 

When the example opens, you will need to change the 'Lines' field in the Channel Parameters.  Click on the down menu arrow and select 'Browse'.

image.png

 

Referencing MCC's Universal Library (UL) Help file (https://www.mccdaq.com/pdfs/manuals/Mcculw_WebHelp/ULStart.htm), it shows the TC-32's Port I/O with the output PortNum to be 'FIRSTPORTB', but a PortType of 'FIRSTPORTA' for Bit I/O.  If the list of channel options in the example only show 'Dev0/1stPortA/...', then the supported 32 digital output bits range from bits 8 thru 39, with 8 being digital output bit 0.  However, if the channel options show both 'Dev0/1stPortA/...' and 'Dev0/1stPortB/...', then 'Dev0/1stPortB/Do0' is digital output 0.  

image.png

 

Table 21 in the TC-32 User's Guide (https://www.mccdaq.com/pdfs/manuals/TC-32.pdf) shows pin 1 as digital output 0 (DOUT0).

image.png

 

With this example, you will need to remove the additional bit elements to test just the digital output 0 channel.

image.png

 

With regards to controlling a solenoid using a digital output channel, please reference the 'Digital Outputs/Temperature Alarms' section beginning on page 14 of the TC-32 User's Guide.  Take a look at Figure 7 which shows an example of controlling a relay.

 

Regards,

Fausto

image.thumb.png.2b8ad26b9638419f3f9c8018c8714edc.png

I am running into this error. How do you suggest I go around this?

Link to comment
Share on other sites

  • 0

The error message states 8 channels in the data and you only selected one channel (Do8) from the Channel Parameters list.

Did you delete the additional bit elements (1-7) or just hide them?

The screen capture below shows bits 3-7 as faded, which indicates a deleted/inactive state.  Right click on the Boolean switch and then select Data Operations - Delete Element.  Delete bits 1-7 and then retest the vi example.

 

image.png

 

Link to comment
Share on other sites

  • 0

This is adding to what is above. Running into the same issue. I do think I have the alarms turned off but still can to seem to get. I can run the labview code with no errors popping up. When I measure with a DMM the output is active is 0VDC  and when I turn it off it still remains 0VDC.  I did set up Do0 through DO7 the same way. per the attached picture. Do i have the setting right? for labview to control the outputs?

trying to get DO working.JPG

instaCal settings.JPG

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...