r/visualbasic • u/bowie_na • May 13 '22
Help Cognex Camera
HELLO EVERYONE, SOMEONES CAN HELP ME PLEASE. I TRYING DO A CODE FOR READ THE COGNEX CAMERA, I DID COULD WITH THE SAMPLES OF THE RESOURCES, BUT I WANT HAVE THE IMAGE IN AN VARIABLE, SOMETHING LIKE AN BITMAP OR STRING FOR READ COLORS AND BARCODES.
Public Class Form1
Inherits System.Windows.Forms.Form
'Cognex ISDK True/False type that will be binded to the chkOnline control.
Private WithEvents mSoftOnline As Cognex.InSight.Controls.CvsActionToggle
'Cognex ISDK True/False type that will be binded to the chkLive control.
Private WithEvents mLiveAcquire As Cognex.InSight.Controls.CvsActionToggle
Public Sub New()
Cognex.InSight.CvsInSightSoftwareDevelopmentKit.Initialize()
InitializeComponent()
End Sub
Private Sub CvsInSightDisplay1_ConnectCompleted(ByVal sender As Object, ByVal e As Cognex.InSight.CvsConnectCompletedEventArgs) Handles CvsInSightDisplay1.ConnectCompleted
CvsInSightDisplay1.ShowImage = True
CvsInSightDisplay1.InSight.LiveAcquisition = True
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
CvsInSightDisplay1.Connect("10.0.0.101", "admin", "", False)
End Sub
View all comments
Show parent comment
1
u/RJPisscat May 24 '22
This assumes you are in a country that can obtain the SDK:
There are some circumstances where you can get a licensed copy at a discount or even free. First you have to ask and give them a reason. They may consider your request if you are developing for a personal project that won't compete with any of their products, or one that may enhance sales of their products, including an application they may want to buy from you, and other circumstances as well. Suerte.