WriteMemory
This FB writes data to consecutive memory locations on the camera. Requires an open control channel (e.g. by calling FB_VN_GevCameraControl.OpenCamera() before)
Syntax
Constructor:
WriteMemory(
OTCID oidITcVnGevImageProvider
)
Execute main:
FB_Main()
FB_Main(
GVCP_REGISTER_ADDRESS nAddress,
USHORT nLength,
PVOID pData,
bool bWrite
)
FB_Main(
bool bWrite
)
Inputs
Name |
Type |
Default |
Description |
---|---|---|---|
nAddress |
|
The address of the first byte to write to the camera (must be 32-bit aligned) | |
nLength |
USHORT |
|
The number of bytes to write, starting at nAddress (must be a multiple of 4, not more than 536) |
pData |
PVOID |
|
Pointer to the data that should be written to the camera (must have a size of at least nLength bytes!) |
bWrite |
bool |
|
Writing the memory is triggered by a rising edge at this input. |
nTimeout |
unsigned int |
VISION_ADS_TIMEOUT |
Indicates the time before the function is cancelled. |
Outputs
Name |
Type |
Description |
---|---|---|
bBusy |
bool |
This output remains TRUE until the function block has executed a command, but at the longest for the duration supplied to the 'nTimeout' input. While bBusy = TRUE, no new command will be accepted at the inputs. |
bError |
bool |
This output is switched to TRUE as soon as an error occurs during the execution of a command. The command-specific error code is contained in ‘nErrorId’. If the function block has a timeout error, 'bError' is TRUE and 'nErrorId' is 1861 (hexadecimal 0x745). Is reset to FALSE by the execution of a command at the inputs. |
nErrorId |
ULONG |
Contains the ADS error code or the command-specific error code of the last executed command. Is reset to 0 by the execution of a command at the inputs. |
nBytesWritten |
USHORT |
The number of bytes that have been successfully written to the camera. |
Required License
TC3 Vision Base
System Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT V3.1.4024.59 or later | PC or CX (x64) with PL50, e.g. Intel 4-core Atom CPU | Tc3_Vision |