Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

I've been trying to use an SC-2345 equipped with an SCC-TC02 and connected to a 6015 with VB.Net.

I've been trying to use an SC-2345 equipped with an SCC-TC02 and connected to a 6015 with VB.Net. So far I have not been able to program the unit and I haven't found a good example on how to program the unit.

The TC02 is equipped with an internal Thermister. I should be able to program the thermocouple channel cjc as "Built in", but this generates an error.

Following is part of my code when declaring the channel.

AiTask.AIChannels.CreateThermocoupleChannel("Dev2/ai7", "ai7," _ Convert.ToDouble(-100), Convert.ToDouble(+100), AIThermocoupleType.J, _

AITemperatureUnits.DegreesC)

0 Kudos
Message 1 of 3
(3,395 Views)
I've never really worked with a SC-2345, but I believe you have to refer to the SC-2345 in your channel string in order to use it. For example, use something like "SCC1Mod1/ai0" rather than "Dev2/ai7", even though SCC1 may be connected to Dev2.

First, you have to make sure the 6015, SC-2345, and SCC-TC02 are setup in MAX. I believe you have to setup the SC-2345 and SCC-TC02 yourself--they aren't autodetected. The setup is pretty easy though. If you haven't already done it, it's detailed in section "Step 8 - Configure the SC-2345/2350" in the Quick Start guide that came with the SC-2345. If the hardcopy isn't nearby, you can download a copy at http://www.ni.com/pdf/manuals/373743b.pdf. Once the SC-2345 is configured, you have to indicate which slot the SCC-TC02 is in by selecting it in the dropdown for that slot.

Once everything is in MAX you can start using it from the API. For me, I setup my SC-2345 under the SCC Connector Block ID "SCC1" (the default) and my SCC-TC02 is in J1. Therefore, the channel string I would use is "SCC1Mod1/ai0" to talk to my SCC-TC02. I tried creating a thermocouple task in MAX with build-in CJC for this channel and it appears to work fine for me.

Good luck,
Chris W
Message 2 of 3
(3,378 Views)
Yes, I overlooked the SCC setup.  Once I updated the MAX setup I was able to re-define the device channel to SCC1Mod1/ai0 and the thermocouple functioned correctly.  Now I'm trying to add my other analog inputs to the same task. Following is channel definitions.  When using this in the software for some reason the thermocouple channel is being modified by the analog channel.

AiTask.AIChannels.CreateVoltageChannel("SCC1Mod1/ai0 , SCC1Mod1/ai1", "AI0 , AI1", _

AITerminalConfiguration.Nrse, Convert.ToDouble(MinVolt), _

Convert.ToDouble(MaxVolt), AIVoltageUnits.Volts)

 

AiTask.AIChannels.CreateThermocoupleChannel("SCC1Mod7/ai0", AIThermocoupleNames, "AI7", _

Convert.ToDouble(-100), Convert.ToDouble(+100), AIThermocoupleType.J, _

AITemperatureUnits.Degrees)

0 Kudos
Message 3 of 3
(3,369 Views)