Jump to content

PTRobot API DLLs for Primera


Recommended Posts

how can we implement the NO CARTRIDGE FUNCTION in autoit ? can someone write me some sample code and function ?

the api definition is

#define PTACT_ALLOW_NO_CARTRIDGES 0x00010000 // SE, II, Pro: Allows unit to operate

non-printing robotics without a cartridge

and in c++ from the sample example

if (myRobotInfo.dwSupportedActions & PTACT_ALLOW_NO_CARTRIDGES)

{

this->m_SysActionCombo.InsertString(this->m_nActions, _T("Allow no Cartridge Robotics"));

this->m_dwActionCombo[this->m_nActions] = PTACT_ALLOW_NO_CARTRIDGES;

this->m_nActions++;

}

cheers

Link to comment
Share on other sites

I don't have a copy of the API handy. could you copy and paste the relevant section?

EDIT: the copy of the API I have is November 15, 2007 / Revision 2.3. I don't see this in there.

Edited by GPinzone
Gerard J. Pinzonegpinzone AT yahoo.com
Link to comment
Share on other sites

I don't have a copy of the API handy. could you copy and paste the relevant section?

EDIT: the copy of the API I have is November 15, 2007 / Revision 2.3. I don't see this in there.

http://www.primera.com/downloads/support/SDK/PTRobotv1.5.6.zip

if they ask you for username and pass use:

Username = supportsdk

Password = sdk191

it has the pdf and the dll's. the function i tell you about is in their sample program inside the zip its also described in the pdf

cheers

Link to comment
Share on other sites

I don't have a copy of the API handy. could you copy and paste the relevant section?

EDIT: the copy of the API I have is November 15, 2007 / Revision 2.3. I don't see this in there.

4.7 Robot Actions

#define PTACT_ALIGNPRINTER 0x00000001

#define PTACT_IGNOREINKLOW 0x00000002

#define PTACT_DISABLEPWRBUTTON 0x00000004

#define PTACT_REINIT_DRIVES 0x00000008

#define PTACT_IDENTIFY 0x00000010

#define PTACT_CANCELCMD 0x00000020

#define PTACT_ENABLEPWRBUTTON 0x00000040

#define PTACT_RESETSYSTEM 0x00000080

#define PTACT_CHECKDISCS 0x00000100 // Check number of discs in bins

#define PTACT_CLEANCARTRIDGES 0x00000200 // Clean the cartridges

#define PTACT_CALIBRATE_ONE_DISC 0x00000400 // SE, II, Pro: Calibrate for one disc

// (user must put one disc in each bin).

#define PTACT_CHANGE_CARTRIDGE 0x00000800 // SE, II, Pro: Start the cartridge

// change procedure

#define PTACT_END_CARTRIDGE_CHANGE 0x00001000 // SE: End the cartridge change (can

// close lid also)

#define PTACT_SHIP_POSITION 0x00002000 // SE, II, Pro: Move the picker to the

// shipping position

#define PTACT_RESET_LEFT_INK_LEVELS 0x00004000 // II: Clears the ink spits for the LEFT

// cartridge

#define PTACT_RESET_RIGHT_INK_LEVELS 0x00008000 // II: Clears the ink spits for the // RIGHT cartridge

#define PTACT_ALLOW_NO_CARTRIDGES 0x00010000 // SE, II, Pro: Allows unit to operate

non-printing robotics without a cartridge

Link to comment
Share on other sites

I don't have a copy of the API handy. could you copy and paste the relevant section?

EDIT: the copy of the API I have is November 15, 2007 / Revision 2.3. I don't see this in there.

this command PTACT_ALLOW_NO_CARTRIDGES is part of PTRobot_SystemAction() in the ptrobot.dll i just dont know how to use it and the parameters

cheers again :unsure: and sorry for the many messages

Link to comment
Share on other sites

That was not the relevant part of the API documentation. Your PTACT_ALLOW_NO_CARTRIDGES is just a constant set to 0x00010000.

Where is the API function declaration of PTRobot_SystemAction(), not the C++ use example?

:unsure:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

That was not the relevant part of the API documentation. Your PTACT_ALLOW_NO_CARTRIDGES is just a constant set to 0x00010000.

Where is the API function declaration of PTRobot_SystemAction(), not the C++ use example?

:unsure:

damn i got no idea mate :/

Link to comment
Share on other sites

The function is in there, but not that constant:

///////////////////////////
//
//  PTRobot_SystemAction
//
//  Description:
//      Function to instruct the system to perform a specifc action.
//  Params:
//      hRobot      Handle to the robot (from EnumRobots)
//      dwAction    Action to perform
//
//  Notes:
//      This function is used to perform a specific function on a
//      robot. The defined actions and their descriptions are detailed
//      below.
//
//  Action:
//      PTACT_ALIGNPRINTER -> Align the Printer (Disc Publisher PRO only)
//  Description:
//      This will cause an alignment print to occur on the printer and
//      this function will return when the alignment is complete.
//
//  Action:
//      PTACT_IGNOREINKLOW -> Ignore Ink Low (Disc Publisher PRO only)
//  Description:
//      This will cause an ink low system error to be ignored.
//
//  Action:
//      PTACT_DISABLEPWRBUTTON -> Disable Power Button
//  Description:
//      This will disable the power button on Disc Publisher II and PRO.
//
//  Action:
//      PTACT_REINIT_DRIVES -> Re-initialize drives
//  Description:
//      PTRobot maintains Registry values for persistent settings including
//      drive serial numbers. This action will clear the drive serial numbers
//      stored which will force the user to re-identify the robotically
//      controlled drives.
//
//  Action:
//      PTACT_IDENTIFY -> Identify a robot
//  Description:
//      This will cause the robot to do something to visually identify itself
//      For example the Bravo units will move their printer tray.
//  Return:
//      PTROBOT_OK if Successful
//      PTROBOT_SEQUENCE if this command is called out of sequence
//      PTROBOT_INTERNAL if an internal error occurred
//      PTROBOT_INVALID_ROBOT if the robot handle is invalid
//      PTROBOT_INVALID_ACTION if the robot action is invalid
//
///////////////////////////
DWORD WINAPI PTRobot_SystemAction(HANDLE hRobot, DWORD dwAction);

So using it would be something like this:

Global Const $PTACT_ALLOW_NO_CARTRIDGES = 0x00010000

; ...

$aRET = DllCall("ptrobot.dll", "int", "PTRobot_SystemAction", "handle", $hRobot, "dword", $PTACT_ALLOW_NO_CARTRIDGES)

:unsure:

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

The function is in there, but not that constant:

///////////////////////////
//
//  PTRobot_SystemAction
//
//  Description:
//      Function to instruct the system to perform a specifc action.
//  Params:
//      hRobot      Handle to the robot (from EnumRobots)
//      dwAction    Action to perform
//
//  Notes:
//      This function is used to perform a specific function on a
//      robot. The defined actions and their descriptions are detailed
//      below.
//
//  Action:
//      PTACT_ALIGNPRINTER -> Align the Printer (Disc Publisher PRO only)
//  Description:
//      This will cause an alignment print to occur on the printer and
//      this function will return when the alignment is complete.
//
//  Action:
//      PTACT_IGNOREINKLOW -> Ignore Ink Low (Disc Publisher PRO only)
//  Description:
//      This will cause an ink low system error to be ignored.
//
//  Action:
//      PTACT_DISABLEPWRBUTTON -> Disable Power Button
//  Description:
//      This will disable the power button on Disc Publisher II and PRO.
//
//  Action:
//      PTACT_REINIT_DRIVES -> Re-initialize drives
//  Description:
//      PTRobot maintains Registry values for persistent settings including
//      drive serial numbers. This action will clear the drive serial numbers
//      stored which will force the user to re-identify the robotically
//      controlled drives.
//
//  Action:
//      PTACT_IDENTIFY -> Identify a robot
//  Description:
//      This will cause the robot to do something to visually identify itself
//      For example the Bravo units will move their printer tray.
//  Return:
//      PTROBOT_OK if Successful
//      PTROBOT_SEQUENCE if this command is called out of sequence
//      PTROBOT_INTERNAL if an internal error occurred
//      PTROBOT_INVALID_ROBOT if the robot handle is invalid
//      PTROBOT_INVALID_ACTION if the robot action is invalid
//
///////////////////////////
DWORD WINAPI PTRobot_SystemAction(HANDLE hRobot, DWORD dwAction);

So using it would be something like this:

Global Const $PTACT_ALLOW_NO_CARTRIDGES = 0x00010000

; ...

$aRET = DllCall("ptrobot.dll", "int", "PTRobot_SystemAction", "handle", $hRobot, "dword", $PTACT_ALLOW_NO_CARTRIDGES)

:unsure:

IT WORKS !! I LOVE YOU MATE !!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...