多次发送TH# TL# 指令导致相机光源极性异常
解决办法:调试完后发送TL#指令关闭光源。
调试后相机帧率跳动异常。
解决中。
原因是halcon的相机驱动没装。
.:
相机自己的驱动也会生效
.:
你连的时候调用的应该是相机自己的驱动
目前状态
* Image Acquisition 01: Code generated by Image Acquisition 01
open_framegrabber ('GigEVision', 0, 0, 0, 0, 0, 0, 'default', -1, 'default', -1, 'false', 'default', 'cam4', 0, -1, AcqHandle)
set_framegrabber_param (AcqHandle, 'grab_timeout', 6000)
set_framegrabber_param (AcqHandle, 'TriggerMode', 'On')
set_framegrabber_param (AcqHandle, 'TriggerSource', 'Software')
get_framegrabber_param (AcqHandle, 'device', Value)
get_framegrabber_param (AcqHandle, 'DeviceID', ValueID)
*info_framegrabber ('GigEVision', 'device', Information, ValueList)
info_framegrabber ('GigEVision', 'info_boards', Information, ValueList)
*info_framegrabber('GigEVision','info_boards',Information,ValueList)
tuple_length(ValueList,lenght_aquipment)
device_list := [ ]
id_list := [ ]
for index:=0 to lenght_aquipment-1 by 1
tuple_split(ValueList[index], '|', Substrings)
tuple_regexp_select(Substrings,'device', Matches_device)
tuple_regexp_select(Substrings,'serial', Matches_device_id)
tuple_split(Matches_device_id, ':', Substrings_id)
tuple_regexp_replace(Substrings_id[1], ['\\s*', 'replace_all'],'',Result_device_id)
tuple_split(Matches_device, ':', Substrings_device)
tuple_regexp_replace(Substrings_device[1], ['\\s*', 'replace_all'],'',Result_device)
id_list[index] := Result_device_id
device_list[index] := Result_device
endfor
set_framegrabber_param (AcqHandle, 'Gain', 17.9887)
*set_framegrabber_param (AcqHandle, 'color_space', 'rgb')
grab_image_start (AcqHandle, -1)
while (true)
set_framegrabber_param (AcqHandle, 'TriggerSoftware', '1')
grab_image_async (Image, AcqHandle, -1)
get_image_time (Image, MSecond, Second, Minute, Hour, Day, YDay, Month, Year)
*时间格式:年_月_日_时_分_秒_毫秒
DayString := Year$'4d' +'_'+ Month$'02d' + '_'+Day$'02d'+'_'
TimeString := Hour$'02d' +'_'+ Minute$'02d' + '_'+Second$'02d'+'_'+MSecond$'03d'
write_image (Image, 'jpeg', 0, 'C:/Users/Administrator/Desktop/Test/'+DayString+TimeString+'.jpeg')
wait_seconds (2)
endwhile
close_framegrabber (AcqHandle)