Differences

This shows you the differences between two versions of the page.

Link to this comparison view

modularpi:cfadca4l:index [2026/02/15 03:10] – created adminmodularpi:cfadca4l:index [2026/02/15 03:16] (current) admin
Line 33: Line 33:
  
 {{ :fieldio:cfnet:cfadc-a4l:add_4key.png?nolink |}} {{ :fieldio:cfnet:cfadc-a4l:add_4key.png?nolink |}}
-===== CFHEADER API ===== 
-  * [[..:cfheaderconnecttousb:index|CFHeader API 및 Demo]] 
-  * [[https://api.comfiletech.com/csharp/api/ComfileTech.Cfnet.Cfheader.DigitalOutputModule.html|Class DigitalOutputModule]] 
-  * [[https://api.comfiletech.com/csharp/api/ComfileTech.Cfnet.Cfheader.DigitalOutputModule.Channel.html|Class DigitalOutputModule.Channel]] 
  
- 
- 
- 
-=====컴버젼 및 처리속도 ===== 
-  * analogInputModule0.Channels[ ]의 NumberOfConversions 속성은 채널 별 아날로그 컨버젼(변환) 횟수를 설정합니다. 
-  * 선형적이고 안정적인 값 측정을 원하신다면, 이 NumberOfConversions 속성 값을 4 이상으로 설정하는 것을 권장합니다.(Defualt = 4) 
-  * 변환 속도는 채널당 약 7.8ms가 소요됩니다.  
-  * NumberOfConversions 값이 4인 경우, 하나의 채널에서 변환이 완료되기까지 약 7.8ms × 4 = 31ms가 걸립니다. 이 후에 변환된 값을 읽을 수 있습니다. 이때 모듈의 통신을 점유하고 있지는 않습니다. 
-  * 채널을 사용하지 않을 경우, 해당 채널의 NumberOfConversions 값을 0으로 설정하세요. 이렇게 하면 시스템이 채널을 건너뛰고 다음 채널로 넘어갑니다. 
-  * NumberOfConversions 값이 0로 설정시 :  해당 채널은 비활성화된 상태로 간주되며, 이때 IsEnabled 속성은 false(비활성화)를 반환합니다. 
-  * NumberOfConversions 값이 1이상 설정시 : 채널은 활성화된 것으로 간주되어 IsEnabled는 true(활성화)를 반환합니다. 
-<code csharp> 
-var cfheader0 = Cfheader.Instances[0]; 
-var analogInputModule0 = cfheader.AnalogInputModules[0]; 
-  
-// Channel 0 will perform 2 conversions first, 
-// then Channel 1 will perform 2 conversions, 
-// channels 2 and 3 will be immediately skipped, 
-// then back to channel 0. 
-analogInputModule0.Channels[0].NumberOfConversions = 2; 
-analogInputModule0.Channels[1].NumberOfConversions = 2; 
-analogInputModule0.Channels[2].NumberOfConversions = 0; 
-analogInputModule0.Channels[3].NumberOfConversions = 0; 
-</code> 
- 
-===== Read(RawValue, Voltage, Current) ===== 
-채널의 상태는 RawValue라는 디지털 원시 값, 전압(Voltage), 또는 전류(Current)로 읽을 수 있습니다. Voltage와 Current 속성은 RawValue 속성으로부터 계산됩니다. 보정(Calibration)이 필요할 수 있습니다. 
- 
- 
-<code csharp> 
- 
-var cfheader0 = Cfheader.Instances[0]; 
-var analogInputModule0 = cfheader0.AnalogInputModules[0]; 
-  
-cfheader0.Open(); 
-  
-while (true) 
-{ 
-    cfheader0.Sync(); 
-  
-    foreach (var c in analogInputModule0.Channels) 
-    { 
-        Console.WriteLine($"Channel {c.Address,2}: {c.RawValue,8} {c.Voltage,8:F2}V {c.Current,8:F2}A"); 
-    } 
-} 
-</code> 
-===== ConversionCompleted Event===== 
-채널의 모든 NumberOfConversions가 완료되고 Sync를 통해 읽힐 때마다 ConversionCompleted 이벤트가 발생합니다. 이 이벤트는 채널의 상태(RawValue)가 변경되지 않았더라도 항상 발생합니다.\\ 
-반면, RawValue 값이 변경되어 전압(Voltage) 및 전류(Current) 속성에도 영향을 줄 경우 이를 감지하려면 RawValueChanged 이벤트를 사용하세요. 
-<code csharp> 
-var cfheader0 = Cfheader.Instances[0]; 
-var analogInputModule0 = cfheader0.AnalogInputModules[0]; 
-  
-foreach(var channel in analogInputModule0.Channels) 
-{ 
-    channel.ConversionCompleted += c => 
-    { 
-        Console.WriteLine($"Channel {c.Address,2}: {c.RawValue,8} {c.Voltage,8:F2}V {c.Current,8:F2}A"); 
-    }; 
-} 
-  
-cfheader0.Open(); 
-  
-while (true) 
-{ 
-    cfheader0.Sync(); 
-} 
-</code> 
- 
-=====C# 예제 프로그램===== 
-  * CFADC모듈의 Ch0 의 아날로그 DATA 값, 전압 값을 읽어오는 프로그램입니다. **[ CFHEADER[0] x CFADC[0] ]** 
-<code csharp> 
-sing ComfileTech.Cfnet.Cfheader; 
-  
-var cfheader0 = Cfheader.Instances[0]; 
-var analogInputModule0 = cfheader0.AnalogInputModules[0]; 
-var CFADC_0_CH0 = analogInputModule0.Channels[0]; 
-  
-cfheader0.Open(); 
-  
-while (true){ 
-    cfheader0.Sync(); 
-    Console.WriteLine($"Channel {CFADC_0_CH0.Address,2}: {CFADC_0_CH0.RawValue,8} {CFADC_0_CH0.Voltage,8:F2}V {CFADC_0_CH0.Current,8:F2}A"); 
-} 
-</code> 
 ===== 기술 지원 정책 ===== ===== 기술 지원 정책 =====